capture is obsolete in Release 11 (5.3). getframe provides the same functionality and supports TrueColor displays by returning TrueColor images.
Syntax
Description
capture creates a bitmap copy of the contents of the current figure, including any uicontrol graphics objects. It creates a new figure and displays the bitmap copy as an image graphics object in the new figure.
capture(h) creates a new figure that contains a copy of the figure identified by h.
[X,cmap] = capture(h) returns an image matrix X and a colormap. You display this information using the statements
Transform Cartesian coordinates to polar or cylindrical
Syntax
Description
[THETA,RHO,Z] = cart2pol(X,Y,Z) transforms three-dimensional Cartesian coordinates stored in corresponding elements of arrays X, Y, and Z, into cylindrical coordinates. THETA is a counterclockwise angular displacement in radians from the positive x-axis, RHO is the distance from the origin to a point in the x-y plane, and Z is the height above the x-y plane. Arrays X, Y, and Z must be the same size (or any can be scalar).
[THETA,RHO] = cart2pol(X,Y) transforms two-dimensional Cartesian coordinates stored in corresponding elements of arrays X and Y into polar coordinates.
Algorithm
The mapping from two-dimensional Cartesian coordinates to polar coordinates, and from three-dimensional Cartesian coordinates to cylindrical coordinates is
Transform Cartesian coordinates to spherical
Syntax
Description
[THETA,PHI,R] = cart2sph(X,Y,Z) transforms Cartesian coordinates stored in corresponding elements of arrays X, Y, and Z into spherical coordinates. Azimuth THETA and elevation PHI are angular displacements in radians measured from the positive x-axis, and the x-y plane, respectively; and R is the distance from the origin to a point.
Arrays X, Y, and Z must be the same size.
Algorithm
The mapping from three-dimensional Cartesian coordinates to spherical coordinates is
Description
case is part of the switch statement syntax, which allows for conditional execution.
A particular case consists of the case statement itself, followed by a case expression, and one or more statements.
A case is executed only if its associated case expression (case_expr) is the first to match the switch expression (switch_expr).
Examples
The general form of the switch statement is:
switch switch_expr
case case_expr
statement,...,statement
case {case_expr1,case_expr2,case_expr3,...}
statement,...,statement
...
otherwise
statement,...,statement
end
Syntax
Description
C = cat( concatenates the arrays dim,A,B) A and B along dim.
C = cat( concatenates all the input arrays (dim,A1,A2,A3,A4,...) A1, A2, A3, A4, and so on) along dim.
cat(2,A,B) is the same as [A,B] and cat(1,A,B) is the same as [A;B].
Remarks
When used with comma separated list syntax, cat(dim,C{:}) or cat(dim,C.field) is a convenient way to concatenate a cell or structure array containing numeric matrices into a single matrix.
Examples
concatenating along different dimensions produces:
produce a 3-by-3-by-1-by-2 array.
Description
The general form of a try statement is:
Normally, only the statements between the try and catch are executed. However, if an error occurs while executing any of the statements, the error is captured into lasterr, and the statements between the catch and end are executed. If an error occurs within the catch statements, execution stops unless caught by another try...catch block. The error string produced by a failed try block can be obtained with lasterr.
No comments:
Post a Comment