DADiSP Worksheet Functions > Function Categories > Fourier Transforms and Signal Processing > LINSCALE
Linearly re-scales an input series.
LINSCALE(xi, xl, xh, yl, yh, clipflag)
xi |
- |
An input series or scalar. |
||||
xl |
- |
A real. The low value input range. |
||||
xh |
- |
A real. The high value input range. |
||||
yl |
- |
A real. The low value output range. |
||||
yh |
- |
A real. The high value output range. |
||||
clipflag |
- |
Optional. An integer, the out of range clipping method:
|
A series or real.
linscale(10, 0, 100, -1, 1)
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.
linscale(0..100, 0.0, 100, -5, 5)
returns a series ranging from -5 to 5.
By default, LINSCALE automatically clips out of range input values.