From: fenn lai on 8 Sep 2007 17:23 I tried to do prediction according to the data in data.txt using the kprediction from I tried to do prediction according to the data in data.txt using the kprediction from your toolbox. The code I used is : ************************************************************************************************************************************ load data.txt A = data(:, 2); Y = A'; PHI = 20*rand(1, 5790); W1 = [ ]; W2 = [ ]; NetDef = ['HHLL' 'L---']; trparms = settrain; trparms=settrain(trparms,'maxiter',200); [W1,W2,PI_vector,iter,lambda]=marq(NetDef,W1,W2,PHI,Y,trparms); U = 27*rand(1, 5790); NN = [2]; [W1,W2,PI_vector,iteration,lambda]=nnarx(NetDef,NN,W1,W2,trparms,Y,U); Yk = kpredict('nnarx',NetDef,NN,10,W1,W2,Y,U) ************************************************************************************************************************************ but it shows error : ****************************************************************** Error using ==> plus Matrix dimensions must agree. Error in ==> kpredict at 83 nmax = max([na,nb+nk-1]); % 'Oldest' signal used as input to the model ****************************************************************** when it's trying to execute the last command : Yk = kpredict('nnarx',NetDef,NN,10,W1,W2,Y,U). May you help me with this? thanks alot! toolbox. The code I used is : ************************************************************************************************************************************ load data.txt A = data(:, 2); Y = A'; PHI = 20*rand(1, 5790); W1 = [ ]; W2 = [ ]; NetDef = ['HHLL' 'L---']; trparms = settrain; trparms=settrain(trparms,'maxiter',200); [W1,W2,PI_vector,iter,lambda]=marq(NetDef,W1,W2,PHI,Y,trparms); U = 27*rand(1, 5790); NN = [2]; [W1,W2,PI_vector,iteration,lambda]=nnarx(NetDef,NN,W1,W2,trparms,Y,U); Yk = kpredict('nnarx',NetDef,NN,10,W1,W2,Y,U) ************************************************************************************************************************************ but it shows error : ****************************************************************** Error using ==> plus Matrix dimensions must agree. Error in ==> kpredict at 83 nmax = max([na,nb+nk-1]); % 'Oldest' signal used as input to the model ****************************************************************** when it's trying to execute the last command : Yk = kpredict('nnarx',NetDef,NN,10,W1,W2,Y,U). May help me with this? thanks alot!
|
Pages: 1 Prev: Time Difference Next: Reading C code in matlab... mex file? |