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

2 ビュー (過去 30 日間)
AS
AS 2016 年 12 月 27 日
回答済み: Star Strider 2016 年 12 月 27 日
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 Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by