SCALE

Scales matrix elements to a specified range

Contents

Function of MOBY-DIC TOOLBOX.

Description

Given a matrix x, with elements in range [xmin ymin], this function converts it in a matrix y, with elements in range [ymin ymax]. The conversion is performed with an affine transformation y = A x + B

Syntax

y = scale(x,xmin,xmax,ymin,ymax) [A B] = scale(x,xmin,xmax,ymin,ymax) [y A B] = scale(x,xmin,xmax,ymin,ymax)

The ranges for matrix x and output matrix y are specified. The matrices A and B can also be returned.

y = scale(x,ymin,ymax) [A B] = scale(x,ymin,ymax) [y A B] = scale(x,ymin,ymax)

The ranges for matrix x are not specified, so they are taken as the maximum and minimum values in x.

Acknowledgements

Contributors:

Copyright is with: