Why the plot window is empty ?

조회 수: 17 (최근 30일)
Rana 55
Rana 55 2017년 11월 29일
댓글: Jan 2017년 12월 1일
Hi Guys I wrote a code and I want to plot it as shown, but it gives me an empty plot. No curves just the x and y-axis .Any answers?
  댓글 수: 4
Connor Ferster
Connor Ferster 2017년 11월 30일
The comments above, plus, your V is currently equal to zero so you wouldn't even see a point on the plot.
KSSV
KSSV 2017년 11월 30일
Don't attach screen shot..attach your code.....

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

답변 (1개)

Rana 55
Rana 55 2017년 12월 1일
편집: Jan 2017년 12월 1일
Ok I do what you say guys but it should not graph like that. The graph should rise not fall I do not know what is wrong
>> L = 10e-3;
>> C =10e-6;
>> R =1000;
>> w = 1/sqrt(L.*C);
>> alpha = R/(2.*L);
>> D1=(- alpha + sqrt(alpha.^2 - w.^2))/2;
>> D2=(- alpha - sqrt(alpha.^2 - w.^2))/2;
>> t = 0 : 0.005 : 0.35;
>> V= exp(D1.*t)+exp(D2.*t);
>> plot(t,V)
[EDITED, Jan, Code formatted]
  댓글 수: 1
Jan
Jan 2017년 12월 1일
"It should not graph like this"? Matlab does exactly, what you instruct it to do. If you expect something else, either the code or the expectations are wrong.

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

카테고리

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