Can't get Neural Networks working

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Can't get Neural Networks working

DRLAN
Hi: I started working on the Neural Networks package. By following the User's Guide, I can't get it started. The code I wrote is as follows:

p=[-1 -1 2 2;0 5 0 5]
t=[-1 -1 1 1]
mMinMaxElements=min_max(p)
[mTrainInputN,cMeanInput,cStdInput]=prestd(p)
nHiddenNeurons=5;
nOutputeurons=1;
BL_net=newff(mMinMaxElements,[nHiddenNeurons nOutputeurons],\
      {"tansig","purelin"},"trainlm","","mse");
[BLnet]=train(BL_net,p,t);
[mTestInputN]=trastd(p,cMeanInput,cStdInput);
[simOut]=sim(BLnet,p)

And the error message shows as:

error: 'finite' undefined near line 38 column 13
error: called from
    tansig at line 38 column 5
    __calcperf at line 85 column 20
    __trainlm at line 107 column 18
    train at line 125 column 11

Could anyone tell me, where goes wrong?
Thanks!

DRLAN