Jump to navigation Jump to search
Scale rows or columns of a matrix to range from 0 to 1.
- [xcorr,mins,maxs] = minmax(x,options);
Scales rows (or columns) of a matrix (x) so each row (or column) has a minimum of 0 and a maximum of 1. The option "mode" specifies whether rows or columns are scaled to have unity range. Optional input (options) is described below.
- x = M by N matrix of data to be scaled (class "double" or "dataset").
options = a structure array with the following fields:
- mode: [ 1 ] dimension of data on which to calculate the minima and maxima for scaling. 1 = over rows (each row will have range [0,1]); 2 = over columns (each column will have range [0,1]). Default is 1.
- xcorr = the scaled data (xcorr will be the same class as x)
- mins = vector of minima for each row (or column)
- maxs = vector of maxima for each row (or column)