How to Plot a 3D Ecuation

8 ビュー (過去 30 日間)
Guillermo
Guillermo 2014 年 10 月 1 日
編集済み: Mike Garrity 2014 年 10 月 1 日
Hi, I would like to plot this example equation:
R is an integer more than 0. Which plot function should I use?
This equation should be a Cylinder.

回答 (1 件)

Mike Garrity
Mike Garrity 2014 年 10 月 1 日
編集済み: Mike Garrity 2014 年 10 月 1 日
It might not seem obvious, but the function is isosurface. You've got a function defined in a 3D space and you're looking for the surface where that's equal to a constant. That surface is called an "isosurface". It's like the 3D analogue of a contour in 2D.
Here's an example:
[y,x,z] = ndgrid(linspace(-5,5,64));
f = (y-z).^2+(z-x).^2+(x-y).^2;
r = 1;
isosurface(x,y,z,f,3*r^2)
r = 2;
isosurface(x,y,z,f,3*r^2)
r = 3;
isosurface(x,y,z,f,3*r^2)

カテゴリ

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