%diode equation
v=[-0.8:.01:0.8];
I0=1e-16;
VT=0.025;
i=I0*(exp(v/VT)-1);
plot(v,i);