rotate figure by transposing matrix in contourf problem
6 ビュー (過去 30 日間)
古いコメントを表示
Hi: I want to rotate the contour plot by transposing the matrix. but the potted figures are observed to be the same. I'm not sure there is any problem with my code. Could anyone give me some suggestions?
code is below:
load new_X
load new_Y
load new_Z
figure(1)
[xc,yc]=contourf(new_X,new_Y,new_Z);
axis equal
figure(2)
[xc,yc]=contourf(new_X',new_Y',new_Z');
axis equal
Thanks! Yu
0 件のコメント
採用された回答
jonas
2018 年 8 月 21 日
編集済み: jonas
2018 年 8 月 21 日
Transposing every matrix does not change anything. If you throw two matrices X & Y as input, then the coordinates for each Z-value is obtained from those matrices, i.e. Z(1,1) is plotted at [X(1,1) Y(1,1)]. If you transpose each matrix, then the coordinates for each Z remains the same. If you are instead throw only the Z matrix as input to contourf, then transposing it works because the Z-values are plotted against their index, i.e. Z(1,1) is plotted at [1 1].
I suppose this is what you are trying to do:
[xc,yc]=contourf(new_Y,new_X,new_Z);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!