MATLAB: Plotting Multiple Curves on the Same Graph

MATLAB

I am plotting a graph of radial velocity against varying radius, but there is also a parameter in the velocity expression similar to the Reynolds number which can have various values, so I would like to set the value of the parameter to 0, 1 and 0.2 and to plot three curves on the same graph, what would be the easiest way to do this?

Best Answer

It depends on your function and what you want to do:
t = linspace(0, 2*pi);
freq = [1 5 9];
ampl = [1 2 3];
s = bsxfun(@times, ampl(:), sin(freq(:)*t));
figure
plot(t, s)
grid