plotting many things in one window
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I have X, which is a 100x100 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
0 Commenti
Risposta accettata
Star Strider
il 6 Gen 2015
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
2 Commenti
Star Strider
il 7 Gen 2015
The matrix doesn’t have to be square. MATLAB will plot it correctly so long as one of its dimensions matches the length of your ‘x’ vector:
t = 1:100;
y = rand(50,100);
figure(1)
plot(t, y)
grid
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!