フィルターのクリア

How do I draw contours on multiple surfaces so that they line up

13 ビュー (過去 30 日間)
Rowan
Rowan 2024 年 7 月 17 日 15:59
コメント済み: Voss 2024 年 7 月 18 日 13:07
I have a 3D plot of a 7 2D curves with 6 surfaces drawn so that tthey connect them. Im looking to draw contours on this figure but the only useful comand I can find is
>> contour3([k1;k2], [x1;x2], [z1;z2], 25, 'color', 'k', 'linewidth', 0.1)
where x1 and z1 are the data for my first curve and k1 is used to determine its position in 3D by fixing it. The problem im having is that the command is drawing 25 contours evenly spaced from the maximum value and minimum value out of z1 and z2 causing it to missmatch with 3rd set of contours as z2 has a much greater maximum value compared to z3 and z4. How can i go about creating contours that wont have this problem? The plot with out contours and a plot with contours along with it rotated can be seen below. Hopefully the images illustrates the problem with mismatching contours. Many thanks in advance.

採用された回答

Voss
Voss 2024 年 7 月 17 日 16:06
Maybe specifying a vector of contour levels, rather than the number of levels, is appropriate. For example:
lev = 0.01:0.01:0.08;
contour3([k1;k2], [x1;x2], [z1;z2], lev, 'color', 'k', 'linewidth', 0.1)
  2 件のコメント
Rowan
Rowan 2024 年 7 月 18 日 9:51
This is perfect, thank you!
Voss
Voss 2024 年 7 月 18 日 13:07
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by