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

 Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 11 Nov. 2020
Bearbeitet: Ameer Hamza am 11 Nov. 2020

0 Stimmen

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 Kommentare

Ben Mai
Ben Mai am 11 Nov. 2020
It works. Thank you very much
Ameer Hamza
Ameer Hamza am 11 Nov. 2020
I am glad to be of help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by