| Neural Network Toolbox | Search  Help Desk |
| premnmx | Examples See Also |
Preprocess data so that minimum is -1 and maximum is 1
[pn,minp,maxp,tn,mint,maxt] = premnmx(p,t)
[pn,minp,maxp] = premnmx(p)
premnmx preprocesses the network training set by normalizing the inputs and targets so that they fall in the interval [-1,1].
premnmx(P,T) takes these inputs,
and returns,
PN - R x Q matrix of normalized input vectors.
minp- R x 1 vector containing minimums for each P.
maxp- R x 1 vector containing maximums for each P.
TN - S x Q matrix of normalized target vectors.
mint- S x 1 vector containing minimums for each T.
maxt- S x 1 vector containing maximums for each T.
[-1,1].
p = [-10 -7.5 -5 -2.5 0 2.5 5 7.5 10]; t = [0 7.07 -10 -7.07 0 7.07 10 7.07 0]; [pn,minp,maxp,tn,mint,maxt] = premnmx(p,t);If you just want to normalize the input,
[pn,minp,maxp] = premnmx(p);
pn = 2*(p-minp)/(maxp-minp) - 1;
prestd, prepca, postmnmx