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

2 次查看(过去 30 天)
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.

采纳的回答

Star Strider
Star Strider 2016-12-27
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-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