フィルターのクリア

I want to combine two plots, one is cone and one is semi-circle

2 ビュー (過去 30 日間)
Todor Kereziev
Todor Kereziev 2021 年 2 月 17 日
編集済み: Matt J 2021 年 2 月 18 日
Hello guys,
I want to ask how I can plot at the same time different geometry figure. I want to have a cone and at the top it I want to add a semi-circle, to look like an ice-cream.
For the cone I am using this function:
R = 1; %// radius in cm
H = 3; %// height in cm
N = 100; %// number of points to define the circumference
[x, y, z] = cylinder([0 R], N);
mesh(x, y, H*z)
And for the semi-circle I have this:
th = linspace( -pi, -pi*2, 100);
R = 1; % radius
x2 = R*cos(th) + 5;
y3 = R*sin(th) + 4;
plot(x2,y3); axis equal;
So how I can combine these too?

回答 (1 件)

Matt J
Matt J 2021 年 2 月 18 日
編集済み: Matt J 2021 年 2 月 18 日
Use hold().

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by