23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2ellipsoid<br />

Purpose Generate ellipsoid<br />

Syntax [x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n)<br />

[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr)<br />

ellipsoid(...)<br />

ellipsoid<br />

Description [x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n) generates three n+1-by-n+1<br />

matrices so that surf(x,y,z) produces an ellipsoid with center (xc,yc,zc)<br />

and radii (xr,yr,zr).<br />

[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr) uses n = 20.<br />

ellipsoid(...) with no output arguments graphs the ellipsoid as a surface.<br />

Algorithm ellipsoid generates the data using the following equation:<br />

( x – xc)<br />

2<br />

xr 2<br />

( y – yc)<br />

----------------------<br />

2<br />

yr 2<br />

( z – zc)<br />

----------------------<br />

2<br />

zr 2<br />

+ +<br />

---------------------<br />

See Also cylinder, sphere, surf<br />

2-485

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!