关于细胞数组的问题
function [MBR,MBF]=MCRGSA() %第一步:常用变量声明,以及种群初始化
M=8;
N=50;
Pm=0.009;
K=5;
t0=5;
alpha=1;
beta=5;
Source=1;
End=[8 6];
Num=[4 5];
ROUTES={[1 2 5 8;1 4 7 8;1 3 7 8;1 4 5 8;1 2 5 6;1 4 5 6;1 3 7 6;1 4 7 6],[1 2 5 8 7 6]};
Cost= [0 14 13 12 -1 -1 -1 -1;14 0 -1 -1 18 -1 -1 -1;13 -1 0 9 -1 -1 17 -1;12 -1 9 0 15 -1 8 -1;-1 18 -1 15 0 16 -1 5;-1 -1 -1 -1 16 0 9 -1;-1 -1 17 8 -1 9 0 10;-1 -1 -1 -1 5 -1 10 0];
Num_end=length(End);%组播目的节点个数
farm=zeros(N,Num_end);%种群
for i=1:Num_end
farm{:,i}=unidrnd(Num(i),N,1);
%farm{:,2}=unidrnd(5,50,1);%随机生成初始种群
end
m=1;
t=t0;
MBR=zeros(M,Num_end);
MBF=zeros(M,1);
while m<=M%设置停止条件
??? Cell contents assignment to a non-cell array object. Error in ==> C:\MATLAB6p5\work\MCRGSA.m
On line 19 ==> farm{:,i}=unidrnd(Num(i),N,1);
请各位帮忙看看是错在哪里了,很急谢谢!