Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can i graphic this function?

1 回表示 (過去 30 日間)
felix jose chavez torres
felix jose chavez torres 2017 年 11 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i need to graphic this function in matlab but i don't know what command i'll use, i need some references.

回答 (2 件)

Rik
Rik 2017 年 11 月 28 日
Look into the meshgrid function to create a grid of your coordinates, make sure the syntax of your formula supports element-wise calculation (e.g. use z=x.^2+y.^2 instead of z=x^2+y^2), and use a function like surf to plot it.
If you get an error, read the documentation first. You can open the documentation by typing doc meshgrid, or you can find it by using your favorite internet search engine. Adding 'Matlab' to the name of your function in the query will usually do the trick.

Star Strider
Star Strider 2017 年 11 月 28 日
Use the cylinder function, and experiment:
[X,Y,Z] = cylinder(1-(1:-0.05:0.01).^3, 25);
figure(1)
surf(X, Y, Z)
axis equal
  1 件のコメント
Rik
Rik 2017 年 11 月 28 日
If you need something that is not rotationaly symmetric around the origin, you will need some further processing on X,Y,Z

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by