PLOT3 Plot 3D Function
Section: Handle-Based Graphics
Usage
This is the 3D plot command. The general syntax for its use isplot3(X,Y,Z,{linespec 1},X,Y,Z,{linespec 2},...,properties...)
where X
Y
and Z
are the coordinates of the points on the
3D line. Note that in general, all three should be vectors. If
some or all of the quantities are matrices, then FreeMat will attempt
to expand the vector arguments to the same size, and then generate
multiple plots, one for each column of the matrices. The linespec
is optional, see plot
for details. You can specify properties
for the generated line plots. You can also specify a handle as an
axes to target
plot3(handle,...)
Example
Here is a simple example of a 3D helix.--> t = linspace(0,5*pi,200); --> x = cos(t); y = sin(t); z = t; --> plot3(x,y,z); Warning: Newly defined variable xlim shadows a function of the same name. Use clear xlim to recover access to the function Warning: Newly defined variable ylim shadows a function of the same name. Use clear ylim to recover access to the function Warning: Newly defined variable zlim shadows a function of the same name. Use clear zlim to recover access to the function --> view(3); Warning: Newly defined variable xlim shadows a function of the same name. Use clear xlim to recover access to the function Warning: Newly defined variable ylim shadows a function of the same name. Use clear ylim to recover access to the function Warning: Newly defined variable zlim shadows a function of the same name. Use clear zlim to recover access to the function
Shown here