# how to plot multiple curves in same figure

2 views (last 30 days)
Nudrat Sufiyan on 17 Aug 2022
Commented: Nudrat Sufiyan on 17 Aug 2022
I want to plot Id-vds curve for different length of Aln as it is mentioned as 'daln' in code. I have plotted for 1nm -daln, and need graph for different daln =1.2,3,4,5 nm .
This is the code for daln = 1nm
clear all;
E0=8.85e-12;
Ealgan=10.31;
talgan=23e-9;
calgan=(Ealgan/talgan);
dit=1.2e12;
q=1.6e-19;
gamma=(1/(1+dit*q/calgan));
nd=1.5e16;
daln=1e-9;
fim=(5.1*1.6e-19);
xaln=(1.9*1.6e-19);
fi0=(3.4*1.6e-19);
fis0=(gamma*(fim-xaln)-(gamma*q*nd*daln/calgan));
sigmapol=3.38e17;
sigmaaln=3.38e17;
Ealn=(10.78*E0);
detaEc=(0.343*1.6e-19);
Vt=fis0-detaEc-(sigmapol*q*daln/Ealn);
cq=3.436e15;
ceq=(calgan*cq/calgan+cq);
mu=0.09;
g=33.3;
Vds=0:0.5:6;
vgs=input('ENTER THE vgs in volts');
m=length(Vds);
for i=1:m
if vgs < Vt
current(1,i)=0;
current1(1,i)=0;
elseif Vds(i) >= (vgs - Vt)
current(1,i)=((mu*ceq/2)*(g)*(vgs-Vt)^2); %Simplified equation by approximation
elseif Vds(i) < (vgs - Vt)
end
end
plot(Vds,current(1,:),'b')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a hemt')

Jan on 17 Aug 2022
Create a loop:
axes('NextPlot', 'on'); % As: hold on
...
for daln = 1:5
...
end
Nudrat Sufiyan on 17 Aug 2022
ok, Thanks, i'll try

### Categories

Find more on Annotations in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by