Hello all, I need some help on trying to plot these as a sine wave curve in Matlab, but can't seem to figure out how. Here's what I have:
t=0:5
r1=[(9.81/16)-(2.40/4)]*exp(-2*t)+(9.81/8)*sin(2*t);
r2=[(9.81/16)-(2.45/4)]*exp(-2*t)+(9.81/8)*sin(2*t);
r3=[(9.81/16)-(2.50/4)]*exp(-2*t)+(9.81/8)*sin(2*t);
figure(1) plot(t,r1) grid on
figure(2) plot(t,r2) grid on
figure(3) plot(t,r3) grid on
They are in the right plot and looks. But can't seem to get them into the sine wave curve I need them in. Any help would be great. Thanks.

 Akzeptierte Antwort

Star Strider
Star Strider am 23 Jul. 2017

0 Stimmen

Use the linspace function to define ‘t’:
t = linspace(0,5);

2 Kommentare

Jim Xiong
Jim Xiong am 23 Jul. 2017
That was easy. Thanks.
Star Strider
Star Strider am 23 Jul. 2017
As always, my pleasure.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots 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!

Translated by