我在程序里写了这么一句可是怎么也调不通,不知道出了什么问题,Gpop和pop 都是{64,6}的cell.
Gpop{63,:}
pop{64,:}
Gpop{63,:}=pop{64,:}; %上一代最优的放第63位
Gpop{64,:}=pop{posMAX,:}; %当代最优的放第64位
下面是相应的输出,请坛子里的大虾帮帮忙,看下出了什么问题
ans =
-2.0453 2.6538 1.6152 -0.4875 -1.0431
-0.3682 -0.9994 -0.8589 3.6295 0.4842
-1.5671 0.4547 -2.5111 2.4818 -0.0834
0.4500 2.2768 0.4676 0.6106 3.0785
-0.9852 -0.8555 -0.6743 3.4210 1.2037
ans =
0.1463 -0.9625 -1.0166 1.1390 0.9951
-1.1062 0.3994 1.3759 0.8008 -0.5926
-0.5224 -1.0528 -1.3902 -0.7005 -0.6812
-1.5633 0.2634 -0.3495 -0.1505 1.2691
1.1206 1.2034 0.1336 -0.6565 -1.0564
-0.7598 1.4552 -0.7657 -0.8477 -0.5187
-0.8862 1.3335 0.9476 -0.8791 0.1851
ans =
-0.3218 -0.8666 0.9344 0.2539 0.8009 -0.6598 0.2095
0.9710 -0.1775 -0.1251 0.0400 0.1523 -1.2217 0.6367
-0.8045 1.1169 -0.8288 -0.0379 -0.0236 0.5478 -0.1700
-0.3137 -0.5249 0.1436 -0.1375 1.5790 0.0378 -0.0675
ans =
1.6024
0.0098
0.6110
-2.4984
-3.0043
ans =
-2.0661
1.3774
0.6887
0
0.6887
-1.3774
-2.0661
ans =
1.7066
-0.5689
-0.5689
-1.7066
ans =
2.4157 1.8216 -0.4413 2.1495 -1.1298
0.3562 -3.1848 0.1552 -2.2142 -0.0209
-2.5099 -1.8288 2.0582 -1.1076 0.1112
-2.5507 2.7620 -0.4266 -0.5104 0.7768
0.7923 -0.0014 -2.0851 1.6898 -2.7448
ans =
-0.7758 0.1771 1.3208 -1.1035 0.8205
-0.8638 -0.2075 0.3092 1.5349 1.0139
0.2443 -0.4335 -0.1396 1.0970 1.6728
1.3682 0.0995 0.3917 -1.2646 -0.7964
0.9847 0.2485 -0.0319 1.2445 -1.2990
1.4282 -0.7427 -0.2603 0.2865 1.2359
0.0425 0.2542 -1.5110 -1.1599 0.7575
ans =
-0.5449 -0.6646 -0.0796 1.0324 -0.9228 0.2748 0.4180
0.8213 0.6957 0.6208 -0.1482 -1.0681 0.3071 0.3337
-0.2737 0.9077 -0.7092 -0.8079 -0.0402 -0.1389 0.9149
-0.2488 0.8420 0.9462 -0.7327 -0.6414 0.1270 0.5310
ans =
-4.3293
1.4841
1.6356
-0.9896
3.1273
ans =
2.0661
1.3774
-0.6887
0
0.6887
1.3774
2.0661
ans =
1.7066
-0.5689
-0.5689
-1.7066
??? The right hand side of this assignment has too few values to satisfy
the left hand side.
Error in ==> adapting at 39
Gpop{63,:}=pop{64,:}; %上一代最优的放第63位