MATLAB: Plotting many things in one window

multiple plotsplotting

Hi,
I have X, which is a 100×100 matrix. I would like to plot each row with respect to the integers 1:100. Of course I could write the following:
Plot(1:100, x(1,:), 1:100, x(2,:), ….)
Is there a shorthand to this ? Thanks

Best Answer

One options is to just give it your vector and the matrix:
x = linspace(0,99);
y = rand(100,100);
figure(1)
plot(x, y)
grid
Another option is the ribbon function.