Scale VI

Owning Palette: Signal Operation VIs

Requires: Full Development System

Removes the offset of an input signal X and then scales the result so that the output sequence is in the range [–1:1].

Details  

Use the pull-down menu to select an instance of this VI.

 Add to the block diagram  Find on the palette

Scale 1D

X is the input array.
Y=(X-offset)/scale is the output array of the same size as X.
scale is the scaling factor.
offset is the offset factor.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Scale 2D

X is the 2D input array.
Y=(X-offset)/scale is the output array of the same size as X.
scale is the scaling factor.
offset is the offset factor.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Scale Details

You can use this VI to normalize any numerical sequence with the assurance that the range of the output sequence is [–1:1].

If X is an array of zeros, this VI returns scale as 1, offset as 0, and Y=(X–offset)/scale as an array of zeros.

Scale 1D

This VI calculates Y=(X–offset)/scale using the following equations:

scale = 0.5(max – min)

offset = min + scale

where max denotes the maximum value in X and min denotes the minimum value in X.

The following equation defines each element of Y.

Y[i] = (X[i] – offset)/scale

Scale 2D

This VI calculates Y=(X-offset)/scale using the following equations:

scale = 0.5(max - min)

offset = min + 0.5 scale

where max denotes the maximum value in X and min denotes the minimum value in X.

The following equation defines each element of Y.

Y[i,j] = (X[i,j] – offset)/scale.