HOW TO PLOT SINGLE GRAPH OF TWO EQUATION WHICH IS CONDITIONALLY SATISFIED

조회 수: 1 (최근 30일)
om prakash roy
om prakash roy 2016년 10월 4일
편집: VBBV 2022년 3월 13일
Vds=0:0.00001:.3; Vt=0.4; Vgs=0.6; Mn=398*10^-4; Cox=9.99*10^-10; p=2; k=Mn*Cox*p; Id1=k/2*(Vgs-Vt)^2; Id=k/2*(2*(Vgs-Vt).*Vds-Vds.^2); if Vds<Vgs-Vt Id;
else Id1; end plot(Vds,Id)

답변 (2개)

Damien
Damien 2016년 10월 4일
Hello,
Just define a variable which contains your result
if Vds<Vgs-Vt
Result=Id;
else
Result=Id1;
end
plot(Vds,Result)

VBBV
VBBV 2022년 3월 13일
편집: VBBV 2022년 3월 13일
clear all;
Vds=0:0.01:.3; Vt=0.4; Vgs=0.6; Mn=398*10^-4; Cox=9.99*10^-10; p=2; k=Mn*Cox*p;
for kk = 1:length(Vds)
if Vds(kk) < (Vgs-Vt)
Idd(kk) =k/2*(2*(Vgs-Vt)*Vds(kk)-Vds(kk)^2);
else
Idd(kk) =k/2*(Vgs-Vt).^2;
end
end
plot(Vds,Idd)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by