Info
This question is closed. Reopen it to edit or answer.
index matrix error
1 view (last 30 days)
Show older comments
% Solve an Input-Output Fitting problem with a Neural Network
load input.txt;
load output.txt;
hiddenlayersize=10;
net=feedforwardnet(hiddenlayersize);
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
[net,tr]=train(net,input,output);
P=input('p=');
result=sim(net,p);
show this message
result=sim(net,p);
??? Index exceeds matrix dimensions.
Error in ==> samplepro at 10
P=input('p=');
0 Comments
Answers (1)
Image Analyst
on 26 May 2012
You ask for p but store it in P. MATLAB is case sensitive, so in your next line, p is still not defined yet. You just define upper case P not lower case p.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!