MATLAB: How do Size input and Target correctly during training of Feed Forward Neural Network

Deep Learning Toolboxfeedforward networkinputneural networktargets

I have a input data set consisting of 12 columns and 108 rows. The target data set consist of 1 column and 108 rows. While training my Neural Network the error message "Targets are incorrectly sized for network. Matrix must have 12 columns" is flagged. Please how do I solve this problem.
Note I am using R2008b version.
Here is my code
load RainData_Cal_Inputs.dat load RData_Cal_target yinputs= RainData_Cal_Inputs ytarget= RData_Cal_target;
[y11,PS] = mapminmax(yinputs)
[y22,PS] = mapminmax(ytarget);
y22=y22'
%Network traning and validation
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainParam.epochs = 200;
net = newff(y11,y22,12); net =init(net); net.trainParam.showCommandLine=true view(net) YY = sim(net,y11);
net = train(net,y11,y22)

Best Answer

Transpose your matrices so that
[ I N ] = size(input) %[ 12 108 ]
[ O N ] = size(target) %[ 1 108 ]
Then search
greg newff
Hope this helps.
Thank you for formally accepting my answer
Greg