0

I am still new in using MATLAB. I am trying to create a feed-forward neural network with MATLAB custom function feedforwardnet, I got my own training set with dimension 2 x 100, which is a multiple-input array.

Now I ran into the problem of how to feed this array into the feedforwardnet function. I tried

[NNINputs, NNTargets] = [n_xk, target] ;

where both n_xk and target are 2 x 100 "double" arrays. It shows the error:

??? Too many output arguments.

I also tried wrapping the array into a cell array as follows

myTrainSet = num2cell([n_xk, target]) ;

This time, it shows

??? Undefined function or method 'feedforwardnet' for input arguments of type 'double'.

But how? the neural network runs like a charm with the default dataset

load house_dataset ;

which is also a 13 x 251 arrays both its input and output. How come it can't work with my cell array or numeric matrix? I've searched through the internet and no much literature covers this topic, and if it does, the discussion is still unclear. Thanks for the help in advance!

Charly H.
  • 83
  • 5
  • What is the interface of your function `feedforwardnet`, i.e. how many parameters and which kind of parameters does it accept? – A. Donda Jan 04 '14 at 17:36
  • The newer versions of Matlab have the tonndata() function that will convert your data to the appropriate format. Coud you provide some more information about your code and the version of Matlab you are using? – rainman Jan 05 '14 at 13:50

0 Answers0