MATLAB: Plotting sine wave for a ODE Problem

MATLABodeplotting

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.

Best Answer

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