Plotting X Y Z

1 回表示 (過去 30 日間)
Ejay Kasai
Ejay Kasai 2011 年 10 月 30 日
hey guy's i'm having some error every time i plot this one. 16*x^2+36*y^2-9*z^2=144 i used this one.
ezplot('16*x^2+36*y^2-9*z^2=144')
but whenever i used ezplot this error always appear.
??? Error using ==> char Cell elements must be character arrays.
i also tried ezplot3('16*x^2+36*y^2-9*z^2=144')
and error like this appears
??? Index exceeds matrix dimensions.
Error in ==> ezplot3 at 56 [y,y0,yargs] = ezfcnchk(args{2},0,'t');
Error in ==> ezplot at 160 fmsg = char(f);
help me please. i want to plot in 3D

回答 (3 件)

Patrick Kalita
Patrick Kalita 2011 年 10 月 31 日
This is simply not what ezplot is designed to do. The documentation for ezplot says that it can plot an explicit function of one variable. You are providing an implicit function of three variables. For this task you should be looking at the isosurface command.
Example:
[x,y,z] = meshgrid( linspace( -10, 10, 20 ) );
f = 16*x.^2 + 36*y.^2 - 9*z.^2;
isosurface(x, y, z, f, 144)

Wayne King
Wayne King 2011 年 10 月 30 日
Hi, I think you might want:
ezmesh('16/9*x.^2+4*y.^2-16')
  1 件のコメント
Walter Roberson
Walter Roberson 2011 年 10 月 30 日
The negative of that needs to be done as well.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2011 年 10 月 30 日
ezplot() cannot deal with functions with 3 variables.
I do not know if ezplot3() can.

カテゴリ

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