필터 지우기
필터 지우기

can anybody tell me whats wrong with this program?

조회 수: 2 (최근 30일)
MOUMITA
MOUMITA 2011년 7월 18일
kn=1e-3;
vt=1.5;
vds=0:0.5:12;
vgs=4:2:8;
m=length(vds);
n=length(vgs);
for i=1:n
for j=1:m
if vgs(i) < vt
cur(i,j)=0;
elseif vds(j) >= (vgs(i) - vt)
cur(i,j)=kn * (vgs(i) - vt)^2;
elseif vds(j) < (vgs(i) - vt)
cur(i,j)= kn*(2*(vgs(i)-vt)*vds(j) - vds(j)^2);
end
end
end
plot(vds,cur(1,:),'w',vds,cur(2,:),'w',vds,cur(3,: ),'w')
xlabel('Vds, V')
ylabel('Drain Current,A')
title('I-V Characteristics of a MOSFET')
text(6, 0.009, 'Vgs = 4 V')
text(6, 0.023, 'Vgs = 6 V')
text(6, 0.045, 'Vgs = 8 V')
i m unable to run this program on MATLAB. its showing errors.
  댓글 수: 2
Andreas Goser
Andreas Goser 2011년 7월 18일
I can run this code without errors - looks like you should provide the error message...
MOUMITA
MOUMITA 2011년 7월 18일
thanks Andreas. will provide d error msg.

댓글을 달려면 로그인하십시오.

답변 (1개)

the cyclist
the cyclist 2011년 7월 18일
The program runs fine for me.
In your plot command, you chose to plot all your lines in white, so they do not show up against the white plot background. Choose another plotting color.
  댓글 수: 4
the cyclist
the cyclist 2011년 7월 20일
If this answer did, in fact, help resolve your issue, you should consider "accepting" it for the benefit of future readers.
Jan
Jan 2011년 7월 20일
@Cyclist: But the errors are still unclear.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Semiconductors and Converters에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by