How to draw 2D object with plot 3D matlab

How to draw 2D object with plot 3D matlab
I have 2 circle and 2 radius ( a and b )and height (h) between two circle.
draw this 2D figure to 3D figure with plot or surf

 Accepted Answer

Matt J
Matt J on 15 Apr 2021
Edited: Matt J on 15 Apr 2021
The command cylinder() will be helpful. This example in particular,

6 Comments

thank u for ur answer sir
but I did that before, but didn't get 2 lines same in the figure
i get that
That is definitely a mistake.
r=____________
[X,Y,Z] = cylinder(r,1000);
surf(X,Y,Z,'EdgeColor','none')
how u do this , i have two radius and two circle ??
As I said, the example at the link I gave you is very similar to what you are trying to do.

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 15 Apr 2021

Commented:

on 16 Apr 2021

Community Treasure Hunt

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

Start Hunting!