How to draw a picture in matlab as below:

2 ビュー (過去 30 日間)
希萌
希萌 2023 年 6 月 6 日
編集済み: Star Strider 2023 年 6 月 6 日
I have the data but I am required to draw a picture in the following style:
So I want to know how to put the two type of picture in one piece
Thank U!

採用された回答

Star Strider
Star Strider 2023 年 6 月 6 日
編集済み: Star Strider 2023 年 6 月 6 日
That resembles a surfc plot. The contour normally only shows the contour llines, however setting the 'FaceColor' to 'flat' (from the default 'none') fills it appropriately.
Try something like this —
Z = peaks;
sc = surfc(Z, 'EdgeColor','interp');
ctr = sc(2);
ctr.FaceColor = 'flat';
zlim([-10 max(zlim)])
xlabel('$z$', 'Interpreter','latex')
ylabel('$\xi$', 'Interpreter','latex')
zlabel('error')
title('(c)error')
EDIT — Re-ran the code.
EDIT — (6 Jun 2023 at 13:04)
Added axis labels and title, changed zlim.
.

その他の回答 (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