how to plot a matrix with vector ??

25 ビュー (過去 30 日間)
yasmeen hadadd
yasmeen hadadd 2018 年 3 月 6 日
回答済み: Star Strider 2018 年 3 月 6 日
A=[ 1 2 3 ; 4 5 6; 7 8 9]; B=1:3; imagesc(A,B)

採用された回答

Star Strider
Star Strider 2018 年 3 月 6 日
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 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by