- •If your function has additional parameters, for example k in myfun:
- •If your function has additional parameters, for example k1,k2 in myfun:
- •Is collected along a path.
- •Vector y are drawn as bars in descending order. Each bar will
- •Vector the same length a X and y or a scalar. If s is a scalar,
- •X and y such that plot(XX,yy) is the stairstep graph.
- •Contour and 2-1/2 d graphs
- •X and y data must be consistently sorted in that if the first
- •2 Inches.
- •If your function has additional parameters, for example k in myfun:
- •If your function has additional parameters, for example k in myfun:
- •Specialized 3-d graphs
- •Inputs.
- •If your function has additional parameters, for example k in myfun:
- •If your function has additional parameters, for example k in myfun:
- •If your function has additional parameters, for example k in myfuntk:
- •If your function has additional parameters, for example k in myfun:
- •If your function has additional parameters, for example k in myfun:
- •Is drawn beneath the mesh.
- •Values in X are normalized via X/sum(X) to determine the area of
- •Volume array.
- •Vector data u,V. The arrays X,y define the coordinates for u,V and
- •Instead of an arrow on the tip. Use a marker of '.' to specify
- •Instead of an arrow on the tip. Use a marker of '.' to specify
- •Interpreted.
- •Instead of the current axes.
- •Imread Read image from graphics file.
- •In the structure returned from imfinfo function.
- •In order to create a cmyk tiff, the colorspace
- •In addition to these png parameters, you can use any
- •Images), 'rle' (run-length encoding of 1-bit
- •Image(f.Cdata);
- •In the movie. For example, if m has four frames then
- •Color related functions
- •Solid modeling
Solid modeling
<cylinder> - Generate cylinder.
CYLINDER Generate cylinder.
[X,Y,Z] = CYLINDER(R,N) forms the unit cylinder based on the generator
curve in the vector R. Vector R contains the radius at equally
spaced points along the unit height of the cylinder. The cylinder
has N points around the circumference. SURF(X,Y,Z) displays the
cylinder.
[X,Y,Z] = CYLINDER(R), and [X,Y,Z] = CYLINDER default to N = 20
and R = [1 1].
Omitting output arguments causes the cylinder to be displayed with
a SURF command and no outputs to be returned.
CYLINDER(AX,...) plots into AX instead of GCA.
See also sphere, ellipsoid.
Reference page in Help browser
doc cylinder
<sphere> - Generate sphere.
SPHERE Generate sphere.
[X,Y,Z] = SPHERE(N) generates three (N+1)-by-(N+1)
matrices so that SURF(X,Y,Z) produces a unit sphere.
[X,Y,Z] = SPHERE uses N = 20.
SPHERE(N) and just SPHERE graph the sphere as a SURFACE
and do not return anything.
SPHERE(AX,...) plots into AX instead of GCA.
See also ellipsoid, cylinder.
Reference page in Help browser
doc sphere
<ellipsoid> - Generate ellipsoid.
ELLIPSOID Generate ellipsoid.
[X,Y,Z]=ELLIPSOID(XC,YC,ZC,XR,YR,ZR,N) generates three
(N+1)-by-(N+1) matrices so that SURF(X,Y,Z) produces an
ellipsoid with center (XC,YC,ZC) and radii XR, YR, ZR.
[X,Y,Z]=ELLIPSOID(XC,YC,ZC,XR,YR,ZR) uses N = 20.
ELLIPSOID(...) and ELLIPSOID(...,N) with no output arguments
graph the ellipsoid as a SURFACE and do not return anything.
ELLIPSOID(AX,...) plots into AX instead of GCA.
The ellipsoidal data is generated using the equation:
(X-XC)^2 (Y-YC)^2 (Z-ZC)^2
------------- + ------------- + ------------ = 1
XR^2 YR^2 ZR^2
See also sphere, cylinder.
Reference page in Help browser
doc ellipsoid
<patch> - Create patch.
PATCH Create patch.
PATCH(X,Y,C) adds the "patch" or filled 2-D polygon defined by
vectors X and Y to the current axes. If X and Y are matrices of
the same size, one polygon ("face") per column is added. C
specifies the color of the face(s) ("flat" coloring), or the
vertices ("interpolated" coloring), for which bilinear interpolation
is used to determine the interior color of the polygon.
For both vector or matrix X and Y, if C is a string, each face
is filled with 'color'. 'color' can be 'r','g','b','c','m','y',
'w', or 'k'. If C is a scalar it specifies the color of the
face(s) by indexing into the colormap. A 1x3 vector C is always
assumed to be an RGB triplet specifying a color directly.
For vector X and Y, if C is a vector of the same length, it
specifies the color of each vertex as indices into the
colormap and bilinear interpolation is used to determine the
interior color of the polygon ("interpolated" shading).
When X and Y are matrices, if C is a 1xn, where n is the number
of columns in X and Y, then each face j=1:n is flat colored by the
colormap index C(j). Note the special case of a 1x3 C is always
assumed to be an RGB triplet ColorSpec and specifies the same
flat color for each face. If C is a matrix the same size as X
and Y, then it specifies the colors at the vertices as colormap
indices and bilinear interpolation is used to color the faces.
If C is 1xnx3, where n is the number of columns of X and Y,
then each face j is flat colored by the RGB triplet C(1,j,:).
If C is mxnx3, where X and Y are mxn, then each vertex
(X(i,j),Y(i,j)) is colored by the RGB triplet C(i,j,:) and the
face is colored using interpolation.
PATCH(X,Y,Z,C) creates a patch in 3-D coordinates. Z must be the
same size as X and Y.
PATCH returns a handle to a Patch object. Patches are children
of AXES objects.
The X,Y,C triple (X,Y,Z,C quad for 3-D) can be followed by
parameter/value pairs to specify additional properties of the
Patch. The X,Y,C triple (X,Y,Z,C quad for 3-D) can be omitted
entirely, and all properties specified using parameter/value
pairs.
Patch objects also support data specified using the properties
Faces, Vertices, and FaceVertexCData (see the reference manual
for more information). These properties do not have a convenience
syntax, but may be specified using param-value pairs. Patch
data specified as XData, YData, ZData, and CData is translated
and stored internally as Faces, Vertices, and FaceVertexCData, and
the original matrices are not stored. When GET is used to query
XData, YData, ZData, or CData, the returned value is computed by
translating from Faces, Vertices, and FaceVertexCData.
GET(H), where H is a patch handle, displays a list of patch
object properties and their current values. SET(H) will display
a list of patch object properties and legal property values.
See also fill, fill3, line, text, shading.
Reference page in Help browser
doc patch
<surf2patch> - Convert surface data to patch data.
SURF2PATCH Convert surface data to patch data.
FVC = SURF2PATCH(S) converts the geometry and color data from SURFACE
object S into PATCH format. The struct FVC contains the faces,
vertices and colors of the patch data and can be passed directly to
the PATCH command.
FVC = SURF2PATCH(Z) calculates patch data from ZData matrix Z.
FVC = SURF2PATCH(Z,C) calculates patch data from ZData, and Cdata
matrices Z and C.
FVC = SURF2PATCH(X,Y,Z) calculates patch data from XData, YData, and
ZData matrices X, Y, and Z.
FVC = SURF2PATCH(X,Y,Z,C) calculates patch data from XData, YData,
ZData, and Cdata matrices X, Y, Z and C.
FVC = SURF2PATCH(...,'triangles') creates triangular faces instead of
quadrilaterals.
[F, V, C] = SURF2PATCH(...) returns the faces, vertices and colors in
three arrays instead of a struct.
Example 1:
[x y z] = sphere;
patch(surf2patch(x,y,z,z));
shading faceted; view(3)
Example 2:
s = surf(peaks);
pause;
patch(surf2patch(s));
delete(s);
shading faceted; view(3)
See also reducepatch, shrinkfaces.
Reference page in Help browser
doc surf2patch
