how to plot a matrix with vector ??
30 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
yasmeen hadadd
am 6 Mär. 2018
Beantwortet: Star Strider
am 6 Mär. 2018
A=[ 1 2 3 ; 4 5 6; 7 8 9]; B=1:3; imagesc(A,B)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 6 Mär. 2018
Depending on what you want, one of these will work:
A=[ 1 2 3 ; 4 5 6; 7 8 9];
B=1:3;
figure(1)
plot(B, A)
grid
figure(2)
surf(A)
set(gca, 'XTick',B)
grid on
If you want a 2D version of the surf plot, add:
view(0, 90)
after it.
Experiment to get the result you want.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh 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!