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

2 次查看(过去 30 天)
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 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by