Can't plot exponential function

6 ビュー (過去 30 日間)
Ben Mai
Ben Mai 2020 年 11 月 11 日
コメント済み: Ameer Hamza 2020 年 11 月 11 日
clc;
X= (0:1:5);
Y=[2200*cos(9939.31*X)- 243.46*sin(9939.31*X)]*exp(-1100*X);
plot (X,Y)
I keep getting error on the function and not sure what I did wrong. Please help me find the error. Thank you

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 11 日
編集済み: Ameer Hamza 2020 年 11 月 11 日
There are syntax issues with your code. Try the following code and compare it with your code to see the mistake
clc;
X= (0:1:5);
Y = (2200*cos(9939.31*X)-243.46*sin(9939.31*X)).*exp(-1100*X);
plot (X,Y)
  2 件のコメント
Ben Mai
Ben Mai 2020 年 11 月 11 日
It works. Thank you very much
Ameer Hamza
Ameer Hamza 2020 年 11 月 11 日
I am glad to be of help!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStair Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by