数学建模社区-数学中国

标题: 新人求助~~ Error using ==> newff Input ranges has values [打印本页]

作者: studyzfr    时间: 2013-7-3 21:25
标题: 新人求助~~ Error using ==> newff Input ranges has values
国内专业的数学建模实训旧版本的MATLAB没有mapminmax函数,我改用premnmx函数
源程序用mapminmax函数如下:
[inputn,inputps]=mapminmax(input_train);
[outputn,outputps]=mapminmax(output_train);

我把他改为

[inputn,minp,maxp,outputn,mint,maxt]=premnmx(input_train,output_train);

inputn=inputn';   %主要是为了建立2-5-1 BP神经网络 没这句会提示输入矩阵不为两列
net=newff(inputn,outputn,5);

为什么会提示
Error using ==> newff
Input ranges has values in the second column larger in the values in the same row of the first column.

。。。。。

求助~~
作者: madio    时间: 2013-7-4 06:51
if any(pr(:,1) > pr(:,2))
  error('Input ranges has values in the second column larger in the values in the same row of the first column.')
end
你看看是不是pr的第一列的元素有比第二列的元素大的情况,第一列是最小值,第二列是最大值
作者: studyzfr    时间: 2013-7-4 13:06
madio 发表于 2013-7-4 06:51
if any(pr(:,1) > pr(:,2))
  error('Input ranges has values in the second column larger in the value ...

检查后改对了,谢谢~




欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5