MATLAB plotting question.
Ältere Kommentare anzeigen
Hi, I am trying to plot out this function y(t) = A cos(xt + s(t)), where A = 1, x = 2 and s(t) = -2sin(t) over 0 to 40 sec in increments of 0.05 sec. I am using this code:
t = 0:0.05:40;
y = cos(2*t - 2sin(t));
plot(t,y)
However I keep getting an error unexpected MATLAB expression. Can anyone tell me what's wrong. I am new to this. Thanks!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!