"Greg Heath" <email@example.com> wrote in message news:firstname.lastname@example.org... > "Christine" wrote in message <email@example.com>...
>> 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.
Christine, use WHICH to check that you're using the NEWNARX function from Neural Network Toolbox. I suspect that you're not, since most of those functions contain much more than five lines of help text (which would make the first executable line of the function line 7, given the function declaration on line 1) and I don't think NEWNARX would call itself recursively that soon in its file.
Also, if you're using a release of MATLAB and Neural Network Toolbox later than release R2010b, you should use NARXNET instead of NEWNARX. See the item "Improved Network Creation" in the R2010b section of the Neural Network Toolbox Release Notes.