rescale
Scale range of array elements
Description
scales all elements in R
= rescale(A
)A
to the interval [0, 1] according to the
minimum and maximum over all elements in A
. The output array
R
is the same size as A
.
specifies options using one or more name-value arguments in addition to any of the
input argument combinations in previous syntaxes. For example,
R
= rescale(___,Name,Value
)rescale(A,"InputMin",5)
sets all elements in
A
that are less than 5 to 5 before scaling to the interval
[0, 1].
Examples
Input Arguments
Name-Value Arguments
Algorithms
rescale
uses the formula to scale the elements of the input array A
when the
values of A
are within the range defined by
InputMin
and InputMax
.
If
l
andu
are not specified, thenrescale
uses the default values 0 and 1, respectively.If
InputMin
is not specified, thenrescale
sets its value to the defaultmin(A(:))
.If
InputMax
is not specified, thenrescale
sets its value to the defaultmax(A(:))
.
Extended Capabilities
Version History
Introduced in R2017b