Running 'surf' many times to change thickness

4 ビュー (過去 30 日間)
sea_centipede
sea_centipede 2023 年 4 月 21 日
回答済み: Kshittiz 2023 年 4 月 24 日
I 'd like to know if the thickness is changed when I run 'surf' command on particular area more than 1 time.
I've looked through mathworks docs and google, but I couldn't come up with an answer.
Below is the code i've worked on to test this problem myself.
In short, section 'b-1' creates triangular pillar without Y-Z surface. And section 'b-2' creates surface ONLY on Y-Z plane.
% b-1 creates 2 surfaces
x = [0, 5, 0; 0, 5, 0];
y = [0, 0, 5; 0, 0, 5];
z = [0, 0, 0; 10, 10, 10];
s0 = surf(x, y, z);
hold on
% b-2 creates surface OLNY on X-Z plane( marked in photo below as 'A')
x2 = [0, 5; 0, 5];
y2 = [0, 0; 0, 0];
z2 = [0, 0; 10, 10];
surf(x2, y2, z2)
I would be very grateful to know if thickness or something else I heven't mentioned is being altered unexpectedly.
And finally, I really appreciate you for paying attention to this matter :)
  2 件のコメント
KSSV
KSSV 2023 年 4 月 21 日
Nothing will be changed. You are felling there migh be chages due to hold on.
sea_centipede
sea_centipede 2023 年 4 月 22 日
I got it!
That explains why the thickness hasn't been changed.
Your answer'll help me out really well.
Again, Thank you for your answer to this question:)

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

回答 (1 件)

Kshittiz
Kshittiz 2023 年 4 月 24 日
Hi,
I understand that you want to know if the thickness is changed if “surf” command is run on a particular area multiple time.
Please know that if you plot over an existing plot, the thickness will not increase. The only change would be that the new plot overlaps the previous plot and since in your case it completely overlaps a section, Hence it is not visible.
You can verify the same by adding “FaceColor” or “EdgeColor” property in one of your surf commands to differentiate between them:
surf(x2, y2, z2, "FaceColor", "red");
I hope this helps!
Thanks!

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by