how to plot a 3d surface using a matrix
1 回表示 (過去 30 日間)
古いコメントを表示
Antonios Georgantas
2018 年 10 月 23 日
コメント済み: Star Strider
2018 年 10 月 24 日
I have a matrix d = 6x181, each of the numbers comprising it being density. How can I draw a surface plot against p and m, where m=1:1:6 and s=0:20:181? There was a similar question in the forum addressing the case of a matrix M with equal dimensions, but it was unclear to me, how to model it for my situation. Any help would be greatly appreciated.
採用された回答
Star Strider
2018 年 10 月 23 日
Another option:
d = sin((1:6)' * (1:181) / 90); % Creates (6x181) Matrix
m = 1:6;
p = 0:20:181;
figure
surf(d)
set(gca, 'XTick',p, 'YTick',m)
xlabel('p')
ylabel('m')
2 件のコメント
その他の回答 (1 件)
Walter Roberson
2018 年 10 月 23 日
See warp() which can accept arbitrary rectangular grid of coordinates including non uniform.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!