Clear Filters
Clear Filters

How to write a cylinder on a plane

2 views (last 30 days)
I'd like to write a matlab code that would create a cylinder without hollow at the top and standing on a plane....
radius = 0,5
height=3
x-coordinate=20
y-coordinate=30
Any suggestion will be greatly appreciated.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 14 Mar 2013
Edited: Azzi Abdelmalek on 14 Mar 2013
height=3
radius=0.5
x_c=20
y_c=30
[X,Y,Z] = cylinder(radius)
Z=Z*height
X=X+x_c
Y=Y+y_c
mesh(X,Y,Z)
  1 Comment
Ko
Ko on 15 Mar 2013
Thanks a lot Sir.... You help me a lot...

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!