Plotting data based on index
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Saar Peles
am 29 Apr. 2020
Beantwortet: Star Strider
am 29 Apr. 2020
I'm trying to plot multiple data sets of arrays that have the same size (1 col 27 rows) on the same plot. The x axis should be the row or index of the datum and the y axis would be its value. How do I do this? I don't normally use plots so this may be a dumb question. Thanks in advance
0 Kommentare
Akzeptierte Antwort
Star Strider
am 29 Apr. 2020
I would do something like this:
y = (sin([1;2;3]*(0:26)*pi/13)).'; % Create Matrix
x = 1:size(y,1);
figure
plot(x, y)
grid
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!