フィルターのクリア

How can I plot this figure using MATLAB?

1 回表示 (過去 30 日間)
Kyle Dalminton
Kyle Dalminton 2020 年 4 月 21 日
コメント済み: darova 2020 年 4 月 22 日
Dear experts.
I am not a MATLAB user myself but a portion of my work requires me to plot figures on MATLAB. I am unable to figure this out and google was not any help. I would be grateful if somebody gives me a clue about how to plot this figure? I would like to use this figure as my starting point to carry on my practice.
I wish you a good day

採用された回答

darova
darova 2020 年 4 月 21 日
Here is patch use
x = 0:0.1:1;
y = sqrt(x);
cla
patch([0 0 0],[0 1 0],[0 0 1],'b') % vertical triangle
patch([1 0 x],[1 1 y],[0 0 x*0],'b') % horizontal triangle
patch([1 0 x],[1 1 y],[0 0 1-y],'b') % diagonal triangle
% use for loop to create cylindrical part
for i = 1:length(x)-1
dx = x(i:i+1);
dy = y(i:i+1);
patch([dx flip(dx)],[dy flip(dy)],[1-dy 0 0],'b')
end
alpha(0.5)
axis vis3d
  2 件のコメント
Kyle Dalminton
Kyle Dalminton 2020 年 4 月 22 日
Salute to you sir/madam. Thank you for helping me.
darova
darova 2020 年 4 月 22 日
my pleasure

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by