MATLAB: Neural Network keep best weight and how to use without training

Deep Learning Toolboxtime series

i have a narnet and i keep the value of weights.
feedbackDelays = 1:5;
hiddenLayerSize = i;
net = narnet(feedbackDelays,hiddenLayerSize,'open',trainFcn);
[inputs,inputStates,layerStates,targets] = preparets(net,{},{},TargetSeries);
[net,tr] = train(net,inputs,targets,inputStates,layerStates);
weight = getwb(net);
inputweights=net.IW;
layerweights=net.LW;
biasvalues=net.b;
i can train and test my data and i took really great Mape
value and i wanna keep weights and use it later but i dont
know how to do that.i research every documentary.
net= setwb(net,weight);
I don't know how to use this function because it give me an matrix dimension error. Where is exactly wrong!?

Best Answer

You probably have to transpose weight. Type
whos weight
and reread the help and doc documentation to make sure the dimensions are correct.
help getwb
doc getwb
and similarly for setwb.
Hope this helps.
THank you for formally accepting my answer
Greg
Hope this helps