Plotting data from three dimensional array
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sandeep Parameshwara
am 4 Jan. 2020
Kommentiert: Cameron B
am 4 Jan. 2020
Hello, I have three dimensional array X of size (10,10,21). I want to plot diagonal elements, i.e X(1,1,:),X(2,2,:) etc over parameter Y=-1:0.1:1. How can I use plot command? When I use plot(Y,X(1,1,:)), I get the error
'Error using plot Data cannot have more than 2 dimensions.'
Thank you for the help.
0 Kommentare
Akzeptierte Antwort
Cameron B
am 4 Jan. 2020
It’s because your y array is 1x21 and your x is 1x100. Your dimensions don’t match. Make sure your y variable is correct.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!