Info

此问题已关闭。 请重新打开它进行编辑或回答。

index matrix error

1 次查看(过去 30 天)
sayed hossain
sayed hossain 2012-5-26
关闭: MATLAB Answer Bot 2021-8-20
% 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=');

回答(1 个)

Image Analyst
Image Analyst 2012-5-26
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.

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by