parametric code for creating a meshgrid of a cylinder

18 views (last 30 days)
Hi, I need to create a parametric Matlab code where the user inputs the cylinder radius and it's length and also the number of theta and z divisions.
Based upon this input the code needs to create the surface of a cylinder and mesh it according to the specified divisions.
For example:
r=5, L=5, d_theta=20, d_z=5
This means that I'd need to get a 3D plot of a surface of a cylinder that has a radius of 5 and length of 5. It's meshgrid will consist of 20 divisions per 2D circle and 5 circles (stacked one on top of the other - creating the surface of a cylinder).
Also, I'd need to save these meshgrid points for further use.
Thanks very much!!!

Answers (0)

Tags

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!