rescale
Scale array elements to a fixed interval.
📝Syntax
Y = rescale(X)
Y = rescale(X, a, b)
Y = rescale(..., 'InputMin', lo, 'InputMax', hi)
📥Input Arguments
Parameter Description
X a numeric array.
a, b the bounds of the output interval (default 0 and 1).
lo, hi optional input limits mapped to a and b.
📤Output Arguments
Parameter Description
Y the rescaled array, same size as X.
📄Description

Y = rescale(X) scales the entries of X to the interval [0, 1].

Y = rescale(X, a, b) scales the entries to the interval [a, b].

💡Examples
Y = rescale([1 2 3 4 5])
Z = rescale([1 2 3 4 5], 0, 10)
🔗See Also
bounds
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub