您的位置:首页 > 编程语言 > MATLAB

matlab 报错 Function 'subsindex' is not defined for values of class 'network'.

2016-11-03 17:39 796 查看
Error using subsindex

Function ‘subsindex’ is not defined for values of class

‘network’.

Error in feedforward (line 4)

net = train(net,traindata,t_lable);

变量列表中存在名字为train的变量,所以导致程序无法识别,修改变量名称由train改成train_test,然后再次调用train函数即可。

学习借鉴处:

http://cn.mathworks.com/matlabcentral/newsreader/view_thread/259336

net = train(net,p,t); <——————–Error here

y=sim(net,p);

By the way,

train is 5000x784 double

You’re trying to call the TRAIN function on the network; however, since

there exists a train variable in the workspace the line where the error

occurs is considered to be an attempt to index into the train variable

rather than a call to the TRAIN function. However, MATLAB does not know how

to use a neural network to index into a variable, so you receive that error.

Rename or delete the train variable and that call should work as a call to

the function rather than an attempt to index into the variable.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  matlab
相关文章推荐