我只能大概跟你说一下 详细的你可以在matlab里面查function
我给你复制下来了你看一下(不高兴看的话直接拉到最后)
mapminmax
Provide feedback about this page
Process matrices by mapping row minimum and maximum values to [-1 1]
Syntax
[Y,PS] = mapminmax(YMIN,YMAX)[Y,PS] = mapminmax(X,FP)Y = mapminmax('apply',X,PS)X = mapminmax('reverse',Y,PS)dx_dy = mapminmax('dx',X,Y,PS)dx_dy = mapminmax('dx',X,[],PS)name = mapminmax('name');fp = mapminmax('pdefaults');names = mapminmax('pnames');remconst('pcheck',FP);
Description
mapminmaxprocesses matrices by normalizing the minimum and maximum values of each row to [YMIN,YMAX].
mapminmax(X,YMIN,YMAX)takesXand optional parameters
X
NxQmatrix or a1xTSrow cell array ofNxQmatrices
YMIN
Minimum value for each row ofY(default is -1)
YMAX
Maximum value for each row ofY(default is +1)
and returns
Y
EachMxQmatrix (whereM==N) (optional)
PS
Process settings that allow consistent processing of values
mapminmax(X,FP)takes parameters as a struct:FP.ymin,FP.ymax.
mapminmax('apply',X,PS)returnsY, givenXand settingsPS.
mapminmax('reverse',Y,PS)returnsX, givenYand settingsPS.
mapminmax('dx',X,Y,PS)returns theMxNxQderivative ofYwith respect toX.
mapminmax('dx',X,[],PS)returns the derivative, less efficiently.
mapminmax('name')returns the name of this process method.
mapminmax('pdefaults')returns the default process parameter structure.
mapminmax('pdesc')returns the process parameter descriptions.
mapminmax('pcheck',FP)throws an error if any parameter is illegal.
Examples
Here is how to format a matrix so that the minimum and maximum values of each row are mapped to default interval [-1,+1].
x1 = [1 2 4; 1 1 1; 3 2 2; 0 0 0][y1,PS] = mapminmax(x1)
Next, apply the same processing settings to new values.
x2 = [5 2 3; 1 1 1; 6 7 3; 0 0 0]y2 = mapminmax('apply',x2,PS)
Reverse the processing ofy1to getx1again.
x1_again = mapminmax('reverse',y1,PS)
Algorithm
It is assumed thatXhas only finite real values, and that the elements of each row are not all equal.
y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin;
See Also
fixunknowns,mapstd,processpca
---------------------------------------------------------------------------------------(下面开始重要部分)
eg:x1_again = mapminmax('reverse',y1,PS)
reverse就代表逆归一化
温馨提示:答案为网友推荐,仅供参考