How to plot multiple y values for a single x value
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abhik Saha
am 22 Okt. 2021
Beantwortet: Star Strider
am 22 Okt. 2021
I have a x matrix of dimension 1x10 and also I have a matrix A whose dimension is 512x10.
Now in the A matrix each column represents the each value in the x matrix so for each value of x, I have 512 points.
Now I want to plot each value of x corresponding each column of the A matrix.
please help me regarding this issue
0 Kommentare
Akzeptierte Antwort
Star Strider
am 22 Okt. 2021
The plot function figures this out automatically —
A = randn(512,10);
x = 1:10;
figure
plot(x, A, '.')
xlim([0 11])
If ‘A’ was a square matrix, it might be necessary to transpose it to get the correct orientation, however here no further action is necessary.
.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!
