Skip to content

Instantly share code, notes, and snippets.

@amitjamadagni
Last active December 24, 2015 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitjamadagni/6732416 to your computer and use it in GitHub Desktop.
Save amitjamadagni/6732416 to your computer and use it in GitHub Desktop.
plot
function i = diodeequation(Dn,Ln,Na,Dp,Lp,Nd,ni,A)
io = q*A*((Dn/Ln)*(ni^2/Na) + (Dp/Lp)*(ni^2/Nd));
V = (K*T/q)*ln(i/io + 1);
i = 0: 0.01: inf;
plot(i,V);
// Calling the function as follows
x = i(with all the inputs)
//output should be a graph ?? is this right ??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment