필터 지우기
필터 지우기

EMERGENCY Cannot plot "10,000*exp(-10000*t);"

조회 수: 1 (최근 30일)
Michael Ferguson
Michael Ferguson 2017년 10월 12일
댓글: Jan 2017년 10월 12일
t = linspace(0,0.001,100);
Impulse = 10,000*exp(-10000*t);
plot(t,Impulse,'r','LineWidth',3);
The plot comes up blank. Why?

채택된 답변

James Tursa
James Tursa 2017년 10월 12일
편집: James Tursa 2017년 10월 12일
Because you used a comma to define the 10000, and MATLAB sees that comma as a statement separator. MATLAB interprets this line
Impulse = 10,000*exp(-10000*t);
as two separate statements
Impulse = 10
000*exp(-10000*t);
Get rid of the comma.
Impulse = 10000*exp(-10000*t);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by