Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: newnarx error
Replies: 3   Last Post: Sep 26, 2013 10:08 AM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 6,387 Registered: 12/7/04
Re: newnarx error
Posted: Sep 25, 2013 10:27 PM

"Christine" wrote in message <fq33r6\$od0\$1@fred.mathworks.com>...
> problem with the codes below..
> Source code:
>
>
> % A problem consisting of sequences of inputs P and targets T
> P = {[0] [1] [1] [0] [-1] [-1] [0] [1] [1] [0] [-1]};
> T = {[0] [1] [2] [2] [1] [0] [1] [2] [1] [0] [1]};
>
> % A two-layer feedforward network with a two-delay input and
> two-delay feedback is created.
> % The network has one hidden layer of five tansig neurons.
> net = newnarx(P,T,[0 1],[1 2],5);
>
> % The network is simulated and its output plotted against
> the targets.
> Y = sim(net,P);
> plot(1:11,[T{:}],1:11,[Y{:}],'o')
>
> % The network is trained for 50 epochs. Again the network's
> output is plotted.
> net = train(net,P,T);
> Yf = sim(net,P);
> plot(1:11,[T{:}],1:11,[Y{:}],'o',1:11,[Yf{:}],'+')
>
>
> When I run the program, this error was prompted out:
>
> Error in ==> newnarx at 7
> net = newnarx(P,T,[0 1],[1 2],5);

I get no error when I run the code.

Date Subject Author
2/27/08 Christine
2/29/08 Ashish Uthama
9/25/13 Greg Heath
9/26/13 Steven Lord