|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
各位高手:
我的程序如下:运行后总显示错误:
??? Subscripted assignment dimension mismatch.
前10组数据为一个类型,中间10组为一个类型,后10组为一个类型
请各位帮忙看下那块有问题,不胜感激!
p=[-0.8315 0.1879 -0.1659 -0.2784 0.0998 0.0947 -0.8119 -0.0775 -0.0299 -0.0238 -0.0294 0.0185 -0.8122 0.0265 -0.0686 -0.0888 0.0132 0.0083 -0.7913 0.0898 -0.1509 -0.1468 0.0109 0.0671 -0.5839 0.0375 -0.1639 -0.2330 -0.0351 0.0930 -0.6179 0.1584 -0.1795 -0.0100 -0.1089 -0.0761;
-0.8630 0.1940 -0.1969 -0.2766 0.1168 0.1005 -0.8583 0.0187 -0.0875 -0.0498 0.0221 -0.0048 -0.7867 0.0162 -0.0996 -0.1018 0.0314 0.0116 -0.8220 0.1410 -0.1699 -0.1415 0.0426 0.0477 -0.5978 0.0648 -0.1940 -0.2284 0.0084 0.0789 -0.6056 0.1540 -0.1626 -0.0656 -0.0417 -0.0785;
-0.8029 0.1759 -0.1825 -0.2993 0.0864 0.1066 -0.8022 -0.0218 -0.0262 -0.0639 -0.0463 0.0099 -0.7314 0.0079 -0.0896 -0.1367 -0.0005 0.0189 -0.7921 0.1470 -0.1457 -0.1898 0.0270 0.0277 -0.5764 0.0344 -0.1645 -0.2075 -0.0443 0.0696 -0.6421 0.1396 -0.1691 -0.0910 -0.0567 -0.0736;
-0.8031 0.1690 -0.1661 -0.3263 0.1146 0.1136 -0.8418 -0.0452 -0.0175 -0.0507 0.0340 -0.0198 -0.7000 -0.0055 -0.0956 -0.1707 -0.0176 0.0383 -0.7836 0.1274 -0.1319 -0.2146 0.0465 0.0480 -0.5090 0.0210 -0.1267 -0.2278 -0.0621 0.0246 -0.5702 0.1634 -0.1504 -0.0922 -0.0935 -0.0686;
-0.8101 0.2280 -0.2232 -0.2721 0.0794 0.1004 -0.8111 -0.0357 -0.0581 0.0103 -0.0253 -0.0301 -0.7650 0.0742 -0.1360 -0.1193 0.0013 0.0222 -0.8011 0.1764 -0.1956 -0.1661 0.0429 0.0413 -0.5976 0.0647 -0.1684 -0.1703 -0.0503 0.0457 -0.5949 0.1848 -0.1739 -0.0322 -0.0482 -0.0870;
-0.8434 -0.0046 -0.0678 -0.0426 0.0712 -0.0345 -0.6609 -0.1075 -0.0704 -0.0980 0.0439 -0.0286 -0.7597 -0.0155 -0.0939 -0.0485 0.0374 -0.0254 -0.7768 -0.0645 -0.0361 -0.0299 0.0756 -0.0830 -0.5139 0.0506 -0.1130 -0.0728 -0.0343 -0.0829 -0.5687 -0.0102 -0.1363 -0.0230 -0.0325 -0.0556;
-0.9362 0.0761 -0.0152 -0.0141 0.0167 -0.0638 -0.9246 0.0737 -0.0357 -0.0230 0.0532 -0.0806 -0.8549 0.1045 -0.0924 -0.0315 0.0299 -0.0547 -0.8810 0.0531 -0.0399 -0.0203 0.0425 -0.0662 -0.6270 0.1410 -0.1281 -0.0670 0.0063 -0.0959 -0.6193 0.0112 -0.0941 -0.0817 0.0182 -0.0743;
-1.0213 0.1330 -0.0226 0.0010 0.0325 -0.0689 -0.9109 0.0344 -0.0251 -0.0433 0.0601 -0.0618 -0.9322 0.1302 -0.0836 0.0178 0.0062 -0.0642 -0.9139 0.0501 -0.0290 -0.0161 0.0248 -0.0401 -0.7519 0.2424 -0.2016 -0.0049 -0.0615 -0.0273 -0.7217 0.0782 -0.1166 -0.0155 -0.0189 -0.0634;
-1.0184 0.1454 -0.0219 0.0011 -0.0112 -0.0401 -0.9265 0.0878 -0.0482 0.0040 -0.0201 -0.0432 -0.9005 0.1320 -0.0826 -0.0084 -0.0156 -0.0477 -0.8963 0.0882 -0.0609 -0.0076 -0.0118 -0.0372 -0.7093 0.2608 -0.2324 0.0285 -0.0899 -0.0551 -0.6620 0.0438 -0.1351 -0.0030 -0.0441 -0.0295;
-1.0455 0.1512 -0.0369 0.0079 -0.0259 -0.0143 -0.9561 0.0614 0.0045 -0.0373 -0.0311 0.0015 -0.9531 0.1440 -0.0755 0.0150 -0.0332 -0.0439 -0.9585 0.1008 -0.0016 -0.0396 -0.0345 -0.0079 -0.8280 0.2877 -0.2365 0.0145 -0.0218 -0.0885 -0.8324 0.1528 -0.1122 -0.0233 -0.0490 -0.0245;
-0.9015 0.2610 -0.2538 -0.2855 0.1197 0.0982 -0.9076 0.0156 -0.1020 0.0289 0.0004 -0.0085 -0.7562 0.0552 -0.1419 -0.1709 0.0309 0.0352 -0.8502 0.1772 -0.1918 -0.1448 0.0330 0.0332 -0.4028 -0.0705 -0.1331 -0.2210 -0.0542 -0.0056 -0.5574 0.1292 -0.1415 -0.0970 -0.0701 -0.1190;
-0.8310 0.1929 -0.2223 -0.2108 0.0245 0.0941 -0.7751 -0.0547 -0.1047 -0.0219 -0.0307 0.0210 -0.7309 0.0369 -0.1482 -0.1411 -0.0147 0.0485 -0.7110 0.0812 -0.1822 -0.1502 -0.0278 0.0684 -0.5586 0.0737 -0.1752 -0.1685 -0.0565 0.0246 -0.5073 0.1262 -0.1393 -0.0787 -0.1074 -0.0586;
-0.7367 0.1366 -0.1805 -0.2305 0.0299 0.0724 -0.7109 -0.0427 -0.0972 -0.0119 -0.0388 -0.0292 -0.6443 0.0022 -0.1299 -0.0975 -0.0385 0.0180 -0.6407 0.0760 -0.1671 -0.0930 -0.0552 0.0049 -0.4254 0.0131 -0.1337 -0.1056 -0.1074 0.0089 -0.4239 0.1734 -0.1125 -0.0311 -0.0453 -0.0760;
-0.7939 0.1474 -0.1691 -0.2924 0.1012 0.0719 -0.7720 -0.0729 -0.0634 -0.0460 0.0356 -0.0389 -0.7001 0.0414 -0.1178 -0.1711 0.0307 0.0062 -0.6899 0.0729 -0.1367 -0.1493 0.0052 -0.0147 -0.4839 0.0324 -0.1486 -0.1409 -0.0555 -0.0570 -0.4798 0.1164 -0.1150 -0.0302 -0.0676 -0.1044;
-0.9150 0.2625 -0.2342 -0.2853 0.1388 0.0901 -0.8335 -0.0303 -0.0651 -0.0159 -0.0156 0.0006 -0.8137 0.1141 -0.1577 -0.1356 0.0256 0.0382 -0.7461 0.1372 -0.1938 -0.1633 -0.0162 0.0691 -0.5439 0.0616 -0.1732 -0.1184 -0.0696 0.0030 -0.4839 0.1595 -0.1392 -0.0651 -0.0820 -0.0435;
-0.7801 0.0196 -0.0748 -0.0370 -0.0361 -0.0008 -0.7691 0.0093 -0.0767 -0.0382 -0.0552 0.0168 -0.7029 0.0066 -0.1072 -0.0324 -0.0484 0.0029 -0.7198 0.0720 -0.1260 -0.0300 -0.0757 0.0092 -0.5662 0.0128 -0.0966 -0.0705 -0.0318 -0.0284 -0.4853 0.2289 -0.1469 0.0073 -0.0524 -0.0659;
-0.8251 -0.0128 -0.0357 0.0103 -0.0189 -0.0267 -0.8020 -0.0299 -0.0303 0.0069 -0.0277 -0.0259 -0.7593 -0.0025 -0.0838 0.0100 -0.0281 -0.0336 -0.7377 -0.0168 -0.0578 -0.0016 -0.0110 -0.0515 -0.6528 0.0311 -0.1074 -0.0208 -0.0244 -0.0425 -0.4813 0.1105 -0.0731 0.0016 -0.0318 -0.0570;
-0.9453 0.1354 -0.0493 -0.0153 -0.0319 -0.0203 -0.8685 0.0751 -0.0393 -0.0302 -0.0389 -0.0246 -0.8138 0.0712 -0.0601 -0.0094 -0.0490 -0.0451 -0.7844 0.0918 -0.0803 -0.0097 -0.0332 -0.0674 -0.6469 0.0397 -0.0714 -0.0229 -0.0551 -0.0859 -0.4792 0.1597 -0.1017 0.0148 -0.0351 -0.0933;
-0.9651 0.0928 -0.0092 -0.0545 0.0065 -0.0222 -0.9159 0.0732 -0.0164 -0.0811 0.0172 -0.0273 -0.8766 0.0895 -0.0592 -0.0449 -0.0175 -0.0148 -0.8716 0.1214 -0.0713 -0.0654 -0.0079 -0.0226 -0.7651 0.0802 -0.0390 -0.0730 -0.0352 -0.0280 -0.5965 0.1640 -0.1339 -0.0266 -0.0684 -0.0581;
-0.9322 0.1243 -0.0549 -0.0039 -0.0260 -0.0487 -0.8725 0.0474 -0.0368 -0.0105 -0.0322 -0.0340 -0.8632 0.0840 -0.0561 0.0028 -0.0392 -0.0443 -0.8199 0.0685 -0.0618 -0.0032 -0.0507 -0.0453 -0.7493 0.0631 -0.0417 -0.0073 -0.0550 -0.0646 -0.5639 0.1373 -0.1154 -0.0133 -0.0654 -0.0590;
-0.8445 0.2440 -0.2282 -0.2050 0.0679 0.0778 -0.9091 0.0479 -0.0681 -0.0061 0.0162 -0.0297 -0.7348 0.0729 -0.1707 -0.1002 0.0169 0.0079 -0.8595 0.1788 -0.1798 -0.1478 0.0778 0.0154 -0.4579 0.0190 -0.1339 -0.1111 -0.0397 -0.0408 -0.6369 0.1443 -0.1517 -0.0585 -0.0314 -0.0669;
-0.9449 0.3536 -0.2605 -0.2349 0.1638 0.0178 -0.9450 0.0884 -0.0890 0.0497 -0.0004 -0.0645 -0.8456 0.1966 -0.2009 -0.1235 0.0587 0.0002 -0.8862 0.2529 -0.2331 -0.1398 0.0599 0.0196 -0.5721 0.0834 -0.1399 -0.1532 -0.0284 -0.0163 -0.6857 0.1916 -0.1860 -0.0564 -0.0366 -0.0575;
-1.0194 0.3946 -0.2376 -0.2691 0.2115 0.0191 -1.0182 0.0901 -0.0137 0.0429 -0.0119 -0.0388 -0.9039 0.2116 -0.1641 -0.1348 0.0763 0.0292 -0.9695 0.2853 -0.1702 -0.1547 0.1117 -0.0043 -0.7108 0.1847 -0.1652 -0.1318 -0.0135 -0.0089 -0.7296 0.1729 -0.1484 -0.0552 -0.0217 -0.0766;
-1.0024 0.3905 -0.2596 -0.2792 0.2300 0.0164 -1.0048 0.1391 -0.0739 0.0303 0.0298 -0.0654 -0.9050 0.2569 -0.2072 -0.1790 0.1077 0.0026 -0.9656 0.3249 -0.2327 -0.1735 0.1292 -0.0002 -0.7118 0.2214 -0.1672 -0.1721 0.0121 -0.0249 -0.8109 0.2335 -0.1897 -0.0620 -0.0156 -0.0522;
-1.1203 0.4453 -0.2555 -0.2597 0.2631 -0.0223 -1.0779 0.0836 0.0221 0.0556 0.0198 -0.0675 -0.9713 0.2434 -0.1725 -0.1428 0.0962 -0.0004 -1.0069 0.2847 -0.1811 -0.1778 0.1399 -0.0041 -0.7899 0.1871 -0.1754 -0.1467 0.0251 0.0101 -0.9729 0.1631 -0.0714 -0.0807 0.0760 -0.0316;
-0.8053 0.0462 -0.0723 -0.0244 -0.0317 -0.0453 -0.7647 -0.0229 -0.0584 -0.0357 -0.0199 -0.0284 -0.6572 -0.0154 -0.1149 -0.0459 -0.0214 -0.0499 -0.6344 -0.0323 -0.0929 -0.0550 -0.0664 -0.0252 -0.4248 0.0133 -0.0614 -0.0781 -0.0475 -0.0484 -0.4043 0.0341 -0.0580 -0.0256 -0.1094 -0.0571;
-0.9554 0.0269 -0.0303 -0.0077 0.0576 -0.0306 -0.9276 -0.0037 -0.0090 -0.0196 0.0511 -0.0405 -0.8103 0.0370 -0.1105 -0.0290 0.0285 -0.0326 -0.8163 -0.0210 -0.0739 -0.0018 0.0203 -0.0299 -0.5351 0.1177 -0.1603 -0.0524 -0.0650 -0.0559 -0.4714 0.0759 -0.1616 -0.0416 -0.0654 -0.0774;
-0.8931 0.0195 -0.0207 -0.0337 0.0054 -0.0253 -0.9083 0.0164 0.0017 -0.0422 0.0077 -0.0218 -0.7421 -0.0053 -0.0664 -0.0404 -0.0277 -0.0296 -0.8111 -0.0293 -0.0378 -0.0241 -0.0076 -0.0114 -0.4739 0.0835 -0.0948 -0.0850 -0.0696 -0.0851 -0.4893 0.0467 -0.0991 -0.0532 -0.0611 -0.0613;
-0.9102 0.0515 -0.0628 0.0364 -0.0006 -0.0474 -0.9177 0.0164 0.0005 0.0055 0.0211 -0.0643 -0.8065 0.0846 -0.1567 0.0253 -0.0170 -0.0399 -0.8519 0.0086 -0.0614 0.0065 0.0249 -0.0476 -0.5323 0.1128 -0.1644 -0.0048 -0.0766 -0.0498 -0.5585 0.1031 -0.1383 -0.0565 -0.0450 -0.0649;
-0.9452 0.1003 -0.0732 0.0394 -0.0187 -0.0526 -0.9451 0.1368 -0.1090 0.0397 -0.0529 -0.0229 -0.7958 0.0990 -0.1553 0.0022 -0.0294 -0.0456 -0.8779 0.1186 -0.1413 0.0341 -0.0333 -0.0434 -0.5041 0.1290 -0.1308 -0.0531 -0.0636 -0.0499 -0.5944 0.0933 -0.1891 0.0019 -0.0383 -0.0875]';
T=[0 0 1;0 0 1;0 0 1;0 0 1;0 0 1;0 0 1;0 0 1;0 0 1;0 0 1;0 0 1;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;0 1 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0;1 0 0]';
for i=1:36
P(i,:)=(p(i,:)-min(p(i,:)))/(max(p(i,:))-min(p(i,:)))
end
net=newff(minmax(P),[14,3],{'tansig','logsig'},'trainlm');
net.trainparam.epochs=1000;
net.trainparam.goal=0.001;
PL.lr=0.01;
net=init(net);
net=train(net,P,t);
y=sim(net,P) |
|