12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

spherePurpose2sphereGenerate sphereSyntaxDescriptionspheresphere(n)[X,Y,Z] = sphere(...)The sphere function generates the x-, y-, and z-coordinates of a unit sphere foruse with surf and mesh.sphere generates a sphere consisting of 20-by-20 faces.sphere(n) draws a surf plot of an n-by-n sphere in the current figure.[X,Y,Z] = sphere(n) returns the coordinates of a sphere in three matricesthat are (n+1)–by–(n+1) in size. You draw the sphere with surf(X,Y,Z) ormesh(X,Y,Z).ExamplesGenerate and plot a sphere.sphereaxis equal10.50−0.5−110.510−0.5−1−1−0.500.52-451

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

Saved successfully!

Ooh no, something went wrong!