From: jamie Grant on
Hello,

I am trying to construct a neural network for use within the simulink enviroment from labeled data that I have generated and saved within the matlab workspace.
Although the network simulates (sim(net,'input vector') and throught the use of the NN toolbox) without any problems I receive the following error messages when attempting to export the block to simulink -

??? Error using ==> add_block
Dimensions specified in 'untitled3/Neural Network/Process Input 1/p'
are invalid. Dimensions must be -1 (inherited) or a non-empty vector
of strictly positive integers.

Error in ==> network.gensim>genNetworkInput at 213
add_block( ...

Error in ==> network.gensim>genNetwork at 119
genNetworkInput(net,i,i,inputNames{i},processInputNames{i},processedInputNames{i},netNameL,st);

Error in ==> network.gensim at 74
genNetwork(net,y,netName,sysName,st)

Error in ==> off_line_nn at 43
gensim(net);
Dimensions specified in


However, using the SAME code and the input and target vectors from the matlab documentation (i.e. 'input vector' = [0 1 2; 1 2 0]; 'target vector' = [1 0 1];) the process is error free.. !!

My data is composed of both an input and output vector of one thousand points which I have exported to the workspace using two 'to workspace' blocks. My input vector and target vector being p = u.signals.values and y = y.signals.values respectively.

the data itself takes on values between -20 and +20 so is not strictly positive (surely that shouldnt matter!? (I have to confess I find the matlab error messages terribly confusing..)

Any sugestions would be greatly appreciated.

Thankyou!