How to draw a cylinder with Z axis length greater than 1?

1 vue (au cours des 30 derniers jours)
AS
AS le 27 Déc 2016
https://in.mathworks.com/help/matlab/ref/cylinder.html
Cylinder command generates a unit cylinder. I want a cylinder with a higher value of Z axis length.

Réponse acceptée

Star Strider
Star Strider le 27 Déc 2016
Try this:
[X,Y,Z] = cylinder(1, 10);
Z(2,:) = Z(2,:) * 10; % Cylinder 10 Units Long
figure(1)
surf(X, Y, Z)
grid on
axis equal

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by