DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > RESCALE
Linearly rescales an input series.
RESCALE(xi, yl, yh, xl, xh, clipflag)
xi |
- |
An input series or scalar. |
||||
yl |
- |
A real. The low value output range. Defaults to 0.0. |
||||
yh |
- |
A real. The high value output range. Defaults to 1.0. |
||||
xl |
- |
Optional. A real, low value input range. Defaults to |
||||
xh |
- |
Optional. A real, high value input range. Defaults to |
||||
clipflag |
- |
Optional. An integer, the out of range clipping method:
|
A series or real.
rescale(10, -1, 1, 0, 100)
returns -0.8, the corresponding output for an input value of 10.0 on a 0 to 100 input range and a corresponding -1.0 to 1.0 output range.
rescale(0..100)
returns a series ranging from 0 to 1. This is equivalent to:
rescale(0..100, 0, 1, 0, 100)
rescale(0..100, -5, 5)
returns a series ranging from -5 to 5. This is equivalent to:
rescale(0..100, -5, 5, 0, 100)
rescale(0..100, -5, 5, -200, 200)
returns a series ranging from 0 to 2.5
By default, RESCALE automatically clips out of range input values. RESCALE uses LINSCALE to linearly convert the input values.