Surf plot of minimum values of four matrices
古いコメントを表示
Hello, I have the following 4 matrices:
ZCV=[1 2 1 2;6 5 2 8;3 5 9 4; 11 2 0.5 6]; % yellow surf
ZBTmod=[5 2 9 4;1 2 0.2 9;10 9 5 7; 0.6 5 8.3 4]; % cyan surf
ZCD=[2 8 9 5;1 0.2 5 8;6 2 5 8; 0.6 9 8 7]; % red surf
ZCB=[6 2 6 2;2.3 6 7.3 5;4 4 4 6; 0.1 2 8 6]; % blue surf
I would like to plot a surf of minimum values of these 4 matrices with view (0 90) such that the color of a portion of the surf is consistent with the color indicated above. Attached is a sketch of my idea:

採用された回答
その他の回答 (1 件)
Create the four surfaces.
ZCV=[1 2 1 2;6 5 2 8;3 5 9 4; 11 2 0.5 6]; % yellow surf
surf(ZCV, FaceColor = "y")
hold on
ZBTmod=[5 2 9 4;1 2 0.2 9;10 9 5 7; 0.6 5 8.3 4]; % cyan surf
surf(ZBTmod, FaceColor = "c")
ZCD=[2 8 9 5;1 0.2 5 8;6 2 5 8; 0.6 9 8 7]; % red surf
surf(ZCD, FaceColor = "r")
ZCB=[6 2 6 2;2.3 6 7.3 5;4 4 4 6; 0.1 2 8 6]; % blue surf
surf(ZCB, FaceColor = "b")
Look at the axes from below.
view([0 0 -1]) % or view(0, -90)
2 件のコメント
Gaetano Pavone
2023 年 3 月 22 日
You can just do
set(gca,'ydir','reverse')
If my answer wasn't what you wanted, you can always change which answer you accept.
カテゴリ
ヘルプ センター および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


