How can I find where those indesirabe plots are from ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ilan Boulet
am 24 Aug. 2022
Kommentiert: Mathieu NOE
am 25 Aug. 2022
Hello.
I am running the following code:
%% Ids(Vds) %%
mu=10;
Cox=3.9;
W=360*(10^(-9));
L=180*(10^(-6));
K=(mu*Cox)*(W/L);
Vth=1;
vds=0:0.2:20;
vgs=0:0.2:20;
n=length(vgs);
m=length(vds);
for j=1:n
for i=1:m
if vgs(j) < Vth
current(1,i)=0;
elseif vds(i) >= (vgs(j) - Vth)
current(1,i)=0.5* K * (vgs(j) - Vth)^2;
elseif vds(i) < (vgs(j) - Vth)
current(1,i)= K*((vgs(j)-Vth)*vds(i) - 0.5*(vds(i)^2));
hold on
end
plot(vds,current(1,:),'b')
xlabel('Vds (V)')
ylabel('Drain Current (A)')
title('I-V Characteristics of a MOSFET')
end
end
hold off;
And this is what I obtain when I plot the thing you can see in the attached file.
As you can see, there are some vertical plots that made a very beatiful spider-net-shape but this not what I am looking for.
I tried to change, kinda randomly I assume, some things in the loop but it didn't work.
Thank you for your help !
1 Kommentar
Abderrahim. B
am 24 Aug. 2022
So how should look like the plot you want? removing those 'vertical' lines ?
Akzeptierte Antwort
Mathieu NOE
am 24 Aug. 2022
hello
maybe this ?
%% Ids(Vds) %%
mu=10;
Cox=3.9;
W=360*(10^(-9));
L=180*(10^(-6));
K=(mu*Cox)*(W/L);
Vth=1;
vds=0:0.2:20;
vgs=0:0.2:20;
n=length(vgs);
m=length(vds);
for j=1:n
for i=1:m
if vgs(j) < Vth
current(1,i)=0;
elseif vds(i) >= (vgs(j) - Vth)
current(1,i)=0.5* K * (vgs(j) - Vth)^2;
elseif vds(i) < (vgs(j) - Vth)
current(1,i)= K*((vgs(j)-Vth)*vds(i) - 0.5*(vds(i)^2));
hold on
end
end
plot(vds,current(1,:),'b')
xlabel('Vds (V)')
ylabel('Drain Current (A)')
title('I-V Characteristics of a MOSFET')
end
hold off;
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Polygons finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!