matlab11467
2007-06-04, 15:03
一运行程序就出现:“??? Error using ==> newff
Input ranges has values in the second column larger in the values in the same row of the first column.”是什么意思?
我的实验数据如下:
结构:8-17-2
表1减速箱状态样本数据
样本
序号 样本输入特征数据 类别
x1 x2 x3 x4 x5 x6 x7 x8
1 -1.7817 -0.2786 -0.2954 -0.2394 -0.1842 -0.1572 -0.1584 -0.1998 1
2 -1.8710 -0.2957 -0.3494 -0.2904 -0.1460 -0.1387 -0.1492 -0.2228 1
3 -1.8347 -0.2817 -0.3566 -0.3476 -0.1820 -0.1435 -0.1778 -0.1849 1
4 -1.8807 -0.2467 -0.2316 -0.2419 -0.1938 -0.2103 -0.2010 -0.2533 1
5 -1.4151 -0.2282 -0.2124 -0.2147 -0.1271 -0.0680 -0.0872 -0.1684 2
6 -1.2879 -0.2252 -0.2012 -0.1298 -0.0245 -0.0390 -0.0762 -0.1672 2
7 -1.5239 -0.1970 -0.1094 -0.1402 -0.0994 -0.1394 -0.1673 -0.2810 2
8 -1.6781 -0.2047 -0.1180 -0.1532 -0.1732 -0.1716 -0.1851 -0.2006 2
9 0.1605 -0.0920 -0.0160 0.1246 0.1802 0.2087 0.2234 0.1003 3
10 0.2045 0.1078 0.2246 0.2031 0.2428 0.2050 0.0704 0.0403 3
11 -1.0242 -0.1461 -0.1018 -0.0778 -0.0363 -0.0476 -0.0160 -0.0253 3
12 -0.7915 -0.1018 -0.0737 -0.0945 -0.0955 -0.0044 0.0467 0.0719 3
表2减速箱测试数据
样本序 号 样本状态数据 类别
x1 x2 x3 x4 x5 x6 x7 x8
13 -1.4736 -0.2845 -3.0724 -0.2108 -0.1904 -0.1467 -0.1696 -0.2001 1
14 -1.6002 -0.2011 -0.1021 -0.1394 -0.1001 -0.1572 -0.1584 -0.2790 2
15 -1.0314 -0.1521 -0.1101 -0.0801 -0.0347 -0.0482 -0.0158 -0.0301 3
训练样本期望值
0 1
0 1
0 1
0 1
1 0
1 0
1 0
1 0
1 1
1 1
1 1
1 1
测试样本期望值
0 1
1 0
1 1
我编的程序如下:
P=[-1.7817 -1.8710 -1.8347 -1.8807 -1.4151 -1.2879 -1.5239 -1.6781 0.1605 0.2045 -1.0242 -0.7915;
-0.2786 -0.2957 -0.2817 -0.2467 -0.2282 -0.2252 -0.1970 -0.2047 -0.0920 0.1078 -0.1461 -0.1018;
-0.2954 -0.3494 -0.3566 -0.2316 -0.2124 -0.2012 -0.1094 -0.1180 -0.0160 0.2246 -0.1018 -0.0737;
-0.2394 -0.2904 -0.3476 -0.2419 -0.2147 -0.1298 -0.1402 -0.1532 0.1246 0.2031 -0.0778 -0.0945;
-0.1842 -0.1460 -0.1820 -0.1938 -0.1271 -0.0245 -0.0994 -0.1732 0.1802 0.2428 -0.0363 -0.0955;
-0.1572 -0.1387 -0.1435 -0.2103 -0.0680 -0.0390 -0.1394 -0.1716 0.2087 0.2050 -0.0476 -0.0044;
-0.1584 -0.1492 -0.1778 -0.2010 -0.0872 -0.0762 -0.1673 -0.1851 0.2234 0.0704 -0.0160 0.0467;
-0.1998 -0.2228 -0.1849 -0.2533 -0.1684 -0.1672 -0.2810 -0.2006 0.1003 0.0403 -0.0253 0.0719]';
T=[0 1;0 1;
1 0;1 0;
1 1;1 1]';
threshold=[0 1;0 1;0 1;0 1;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1];
net=newff(threshold,[17,2],{'tansig','logsig'},'trainlm');
net.trainParam.epochs=1000;
net.trainParam.goal=0.01;
LP.lr=0.1;
net=train(net,P,T);
P_test=[-1.4736 -1.6002 -1.0314;
-0.2845 -0.2011 -0.1521;
-3.0724 -0.1021 -0.1101;
-0.2108 -0.1394 -0.0801;
-0.1904 -0.1001 -0.0347;
-0.1467 -0.1572 -0.0482;
-0.1696 -0.1584 -0.0158;
-0.2001 -0.2790 -0.0301]';
Y=sim(net,P_test)
Input ranges has values in the second column larger in the values in the same row of the first column.”是什么意思?
我的实验数据如下:
结构:8-17-2
表1减速箱状态样本数据
样本
序号 样本输入特征数据 类别
x1 x2 x3 x4 x5 x6 x7 x8
1 -1.7817 -0.2786 -0.2954 -0.2394 -0.1842 -0.1572 -0.1584 -0.1998 1
2 -1.8710 -0.2957 -0.3494 -0.2904 -0.1460 -0.1387 -0.1492 -0.2228 1
3 -1.8347 -0.2817 -0.3566 -0.3476 -0.1820 -0.1435 -0.1778 -0.1849 1
4 -1.8807 -0.2467 -0.2316 -0.2419 -0.1938 -0.2103 -0.2010 -0.2533 1
5 -1.4151 -0.2282 -0.2124 -0.2147 -0.1271 -0.0680 -0.0872 -0.1684 2
6 -1.2879 -0.2252 -0.2012 -0.1298 -0.0245 -0.0390 -0.0762 -0.1672 2
7 -1.5239 -0.1970 -0.1094 -0.1402 -0.0994 -0.1394 -0.1673 -0.2810 2
8 -1.6781 -0.2047 -0.1180 -0.1532 -0.1732 -0.1716 -0.1851 -0.2006 2
9 0.1605 -0.0920 -0.0160 0.1246 0.1802 0.2087 0.2234 0.1003 3
10 0.2045 0.1078 0.2246 0.2031 0.2428 0.2050 0.0704 0.0403 3
11 -1.0242 -0.1461 -0.1018 -0.0778 -0.0363 -0.0476 -0.0160 -0.0253 3
12 -0.7915 -0.1018 -0.0737 -0.0945 -0.0955 -0.0044 0.0467 0.0719 3
表2减速箱测试数据
样本序 号 样本状态数据 类别
x1 x2 x3 x4 x5 x6 x7 x8
13 -1.4736 -0.2845 -3.0724 -0.2108 -0.1904 -0.1467 -0.1696 -0.2001 1
14 -1.6002 -0.2011 -0.1021 -0.1394 -0.1001 -0.1572 -0.1584 -0.2790 2
15 -1.0314 -0.1521 -0.1101 -0.0801 -0.0347 -0.0482 -0.0158 -0.0301 3
训练样本期望值
0 1
0 1
0 1
0 1
1 0
1 0
1 0
1 0
1 1
1 1
1 1
1 1
测试样本期望值
0 1
1 0
1 1
我编的程序如下:
P=[-1.7817 -1.8710 -1.8347 -1.8807 -1.4151 -1.2879 -1.5239 -1.6781 0.1605 0.2045 -1.0242 -0.7915;
-0.2786 -0.2957 -0.2817 -0.2467 -0.2282 -0.2252 -0.1970 -0.2047 -0.0920 0.1078 -0.1461 -0.1018;
-0.2954 -0.3494 -0.3566 -0.2316 -0.2124 -0.2012 -0.1094 -0.1180 -0.0160 0.2246 -0.1018 -0.0737;
-0.2394 -0.2904 -0.3476 -0.2419 -0.2147 -0.1298 -0.1402 -0.1532 0.1246 0.2031 -0.0778 -0.0945;
-0.1842 -0.1460 -0.1820 -0.1938 -0.1271 -0.0245 -0.0994 -0.1732 0.1802 0.2428 -0.0363 -0.0955;
-0.1572 -0.1387 -0.1435 -0.2103 -0.0680 -0.0390 -0.1394 -0.1716 0.2087 0.2050 -0.0476 -0.0044;
-0.1584 -0.1492 -0.1778 -0.2010 -0.0872 -0.0762 -0.1673 -0.1851 0.2234 0.0704 -0.0160 0.0467;
-0.1998 -0.2228 -0.1849 -0.2533 -0.1684 -0.1672 -0.2810 -0.2006 0.1003 0.0403 -0.0253 0.0719]';
T=[0 1;0 1;
1 0;1 0;
1 1;1 1]';
threshold=[0 1;0 1;0 1;0 1;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1];
net=newff(threshold,[17,2],{'tansig','logsig'},'trainlm');
net.trainParam.epochs=1000;
net.trainParam.goal=0.01;
LP.lr=0.1;
net=train(net,P,T);
P_test=[-1.4736 -1.6002 -1.0314;
-0.2845 -0.2011 -0.1521;
-3.0724 -0.1021 -0.1101;
-0.2108 -0.1394 -0.0801;
-0.1904 -0.1001 -0.0347;
-0.1467 -0.1572 -0.0482;
-0.1696 -0.1584 -0.0158;
-0.2001 -0.2790 -0.0301]';
Y=sim(net,P_test)