MATLAB: Using mapminmax simulink tool in the neural network

neural networksimulink

Hello, I am new to neural network toolbox in Simulink. In MAPMINMAX function, it asks for parameters MAXIMUMx [Nx1] and MINIMUMx [Nx1]. As far as I know, when I provide a input given in user guide X = [1 2 4; 1 1 1; 3 2 2; 0 0 0], it being a 4×3 matrix, max_x is 4, and min_x is 0. But when I provide the parameters as 4 and 0 resp, I dont see the correct output as supposed to be by [Y,PS] = mapminmax(X). Also, I tried to provide Minimum_X = [1;1;2;0] and Maximum_X = [4;1;3;0], i.e max and min from each row, but even that doesnt give the same results. It seems I dint understand the function correctly, in Simulink. Can someone please explain what is going wrong here?

Best Answer

In the MATLAB NN ToolBox, ROWS are variables and COLUMNS are data vectors.
MINMAX finds the extrema of rows
X = [1 2 4; 1 1 1; 3 2 2; 0 0 0],
minmaxX = minmax(X)
minmaxX = 1 4
1 1
2 3
0 0
If the row mins and row maxes are different, MAPMINMAX scales the rows between -1 and 1. For example, see rows 1 and 3 of the transformed X:
mapminmaxX = mapminmax(X)
mapminmaxX =
-1 -0.33333 1
1 1 1
1 -1 -1
0 0 0
Hope this helps.
Thank you for formally accepting my answer
Greg