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

9 ビュー (過去 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?
  1 件のコメント
Jan
Jan 2017 年 10 月 12 日
EMERGENCY? Don't panic.

サインインしてコメントする。

採用された回答

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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by