I used ffnew
functions many times but when I am trying to create a simple feed forward network such that the input vector is P=[1;2;3;4]
and the desired output is T=[1 ;0;0;1]
. So i only have one sample input vector
The code is
net = newff(P,T,[4 1],{'tansig','tansig'});
net=train (net,P,T);
When I write the last line I got:
??? Error using ==> plus
Matrix dimensions must agree.
Error in ==> calcperf2 at 163
N{i,ts} = N{i,ts} + Z{k};
Error in ==> trainlm at 253
[perf,El,trainV.Y,Ac,N,Zb,Zi,Zl] = calcperf2(net,X,trainV.Pd,trainV.Tl,trainV.Ai,Q,TS);
Error in ==> network.train at 216
[net,tr] = feval(net.trainFcn,net,tr,trainV,valV,testV);