From: jia on
I do not know if I am right. If you check the document. you will notice :
Pi = [u(1:2); y(1:2)];
narx_net = train(narx_net,[p;t],t,Pi);



"Christine " <christine_gee(a)hotmail.com> wrote in message <hrmadj$7ct$1(a)fred.mathworks.com>...
> I have simplify the actual problem. I am using narxsp to train my problem. Whenever I use d1=[0 1] and d2=[0 1], there is an error occurred when executing the conversion from narxsp to the parallel form. It says, "network contains a zero-delay loop".
>
> If I want to change my d1 and d2 (delay) value. How should I represent the data? If I just change the d1 and d2, the training result is not good.
>
> Besides, can explain d1 and d2? I just know that it is a delay loop. But, How does it actually functions?
>
> %---------------------------------------------------------------------------
> P = [0 1 1 0 -1 -1 0 1 1 0 -1];
> T = [0 1 2 2 1 0 1 2 1 0 1];
> PT = [P;T];
> d1=[0 1];
> d2=[0 1];
> net = newnarxsp(P,T,d1,d2,5,{'tansig','purelin'});
>
> [net,tr,Y,e] = train(net,PT,T);
>
> net = sp2narx(net); % convert the narxsp to parallel form
> Y = sim(net,P);
> %---------------------------------------------------------------------------
>
> The Error:
> ??? Error using ==> network.sim at 169
> Network contains a zero-delay loop.