I am trying to simulate my circuit for one of the question problems. The question looks like this
I have written a MATLAB script to see the expected graph
%Script for making a plot of the problem 5.26
vt = 0.5 ; vd = 1 ; k = 2e-3;
vgd = 0:0.1:1.8; id = zeros(size(vg)); % Initialize id as a vector i = 1; %just to assign them
for vg = 0:0.1:1.8
%cut off situation
if vg <= vt
id(i) = 0;
i = i+1;
%triode situation
elseif (vd<=(vg-vt))
id(i) = k.*(vg-vt).*vd - (k.*vd^2/2);
i = i+1 ;
%saturation situation
elseif (vd>(vg-vt))
id(i) = k/2.*(vg-vt)^2;
i = i+1;
end
end
plot(vgd, id) ;
title("Id/Vg relationship graph")
Which pretty much give me a graph like this
I am trying to now simulate it on multisim and I am not getting anything. I am doing DC sweep to analyse the Id. I am changing the vgs with 0.1V increment till 1.8