MATLAB: Plot a graph

loop forplot

Hi,
I have
t=0:0.01:10
x=a*t
y=sin(x)
and a has two values a=2, a=3
I want to plot (x, y) with two values of a in the same loop. Thanks in advance

Best Answer

t=0:0.01:10;
a = [2 3];
x=a'*t;
y=sin(x);
plot(x',y')