if true clear all;hfin=1;tsi=20W=2*hfin*tsi;Vth=1;Leff=180;DIBL=1.127*(W\Leff);vth=Vth-DIBL;lambda=25*10^-5;u=1360;ld=0.1;Ec=1.5*106;Cox=60;Vds=0:0.5:10;vgs=input('ENTER THE Vgs in volts');m=length(Vds);for i=1:mif vgs < Vthcurrent(1,i)=0;elseif Vds(i) >= (vgs - Vth)current(1,i)=0.5* (vgs - Vth)^2*(1+lambda*Vds(i));elseif Vds(i) < (vgs - Vth)current(1,i)=((vgs-vth)*Vds(i))- 0.5*(Vds(i)^2)*(2*W*u*Cox/(Leff-ld+(Vds/Ec))+lambda*2*W*Cox/(Leff-ld)^2);endendplot(Vds,current(1,:),'b')xlabel('Vds, V')ylabel('Drain Current,A')title('I-V Characteristics of a MOSFET')end
MATLAB: The below program is the Ids Vds characteristics of a DG MOSFET. and I am getting the error as Matrix dimensions must agree.. Please help me by fixing it
for different values of ids and vdsfor loopgraph
Best Answer