Specify the figure alphamap (transparency)
Syntax
alphamap(alpha_map)
alphamap('parameter')
alphamap('parameter',length)
alphamap('parameter',delta)
alphamap(figure_handle,...)
alpha_map = alphamap
alpha_map = alphamap(figure_handle)
alpha_map = alphamap('parameter')
Description
alphamap
enables you to set or modify a figure's Alphamap
property. Unless you specify a figure handle as the first argument, alphamap
operates on the current figure.
alphamap(alpha_map)
set the AlphaMap
of the current figure to the specified m-by-1 array of alpha values.
alphamap('parameter')
create a new or modify the current alphamap. You can specify the following parameters:
default
- set theAlphaMap
property to the figure's default alphamaprampup
- create a linear alphamap with increasing opacity (defaultlength
equals the current alphamap length)rampdown
- create a linear alphamap with decreasing opacity (defaultlength
equals the current alphamap length)vup
- create an alphamap that is opaque in the center and becomes more transparent linearly towards the beginning and end (defaultlength
equals the current alphamap length)vdown
- create an alphamap that is transparent in the center and becomes more opaque linearly towards the beginning and end (defaultlength
equals the current alphamap length)increase
- modify the alphamap making it more opaque (defaultdelta
is.1
, which is added to the current values)decrease
- modify the alphamap making it more transparent (defaultdelta
is.1
, which is subtracted from the current values)spin
- rotate the current alphamap (defaultdelta
is 1; note that delta must be an integer)
alphamap('parameter',length)
creates a new alphamap with the length specified by length
(used with parameters: rampup
, rampdown
, vup
, vdown
)
alphamap('parameter',delta)
modifies the existing alphamap using the value specified by delta
(used with parameters: increase
, decrease
, spin
).
alphamap(figure_handle,...)
performs the operation on the alphamap of the figure identified by figure_handle
.
alpha_map = alphamap
return the current alphamap.
alpha_map = alphamap(figure_handle)
returns the current alphamap from the figure identified by figure_handle
.
alpha_map = alphamap('parameter')
retruns the alphamap modified by the parameter
, but does not set the AlphaMap
property.
Syntax
Description
P = angle(Z)
returns the phase angles, in radians, for each element of complex array Z
. The angles lie between .
For complex Z
, the magnitude R
and phase angle theta
are given by
converts back to the original complex Z
.
Examples
Z = [ 1 - 1i 2 + 1i 3 - 1i 4 + 1i
1 + 2i 2 - 2i 3 + 2i 4 - 2i
1 - 3i 2 + 3i 3 - 3i 4 + 3i
1 + 4i 2 - 4i 3 + 4i 4 - 4i ]
P = angle(Z)
P =
-0.7854 0.4636 -0.3218 0.2450
1.1071 -0.7854 0.5880 -0.4636
-1.2490 0.9828 -0.7854 0.6435
1.3258 -1.1071 0.9273 -0.7854
Algorithm
The angle
function can be expressed as angle(z) = imag(log(z)) = atan2(imag(z),real(z))
.
Syntax
Description
MATLAB creates the ans
variable automatically when you specify no output argument.
Examples
any
Syntax
Description
B = any(A)
tests whether any of the elements along various dimensions of an array are nonzero or logical true (1
).
If A
is a vector, any(A)
returns logical true (1
) if any of the elements of A
are nonzero, and returns logical false (0
) if all the elements are zero.
If A
is a matrix, any(A)
treats the columns of A
as vectors, returning a row vector of 1
s and 0
s.
If A
is a multidimensional array, any(A)
treats the values along the first non-singleton dimension as vectors, returning a logical condition for each vector.
B = any(A,
tests along the dimension of dim
) A
specified by scalar dim
.
Examples
then B = (A <> returns logical true (
1
) only where A
is less than one half:
The any
function reduces such a vector of logical conditions to a single condition. In this case, any(B) yields 1
.
This makes any
particularly useful in if
statements,
where code is executed depending on a single condition, not a vector of possibly conflicting conditions.
Applying the any
function twice to a matrix, as in any(any(A))
, always reduces it to a scalar condition.
area
Area fill of a two-dimensional plot
Syntax
Description
An area plot displays elements in Y
as one or more curves and fills the area beneath each curve. When Y
is a matrix, the curves are stacked showing the relative contribution of each row element to the total height of the curve at each x interval.
area(Y)
plots the vector Y
or the sum of each column in matrix Y
. The x-axis automatically scales depending on length(Y)
when Y
is a vector and on size(Y,1)
when Y
is a matrix.
area(X,Y)
plots Y
at the corresponding values of X
. If X
is a vector, length(X)
must equal length(Y)
and X
must be monotonic. If X
is a matrix, size(X)
must equal size(Y)
and each column in X
must be monotonic. To make a vector or matrix monotonic, use sort
.
area(...,ymin)
specifies the lower limit in the y direction for the area fill. The default ymin
is 0
.
area(...,'
specifies property name and property value pairs for the patch graphics object created by PropertyName
',PropertyValue,...) area
.
h = area(...)
returns handles of patch graphics objects. area
creates one patch object per column in Y
.
Remarks
area
creates one curve from all elements in a vector or one curve per column in a matrix. The colors of the curves are selected from equally spaced intervals throughout the entire range of the colormap.
Examples
No comments:
Post a Comment