www.pudn.com > LBG_GA.rar > transfer_mat.m, change:2011-04-19,size:244b


function y=transfer_mat(ga_pop,n,l) 
%将遗传操作后的种群进行转化为12*32的矩阵 
% ga_pop=rand(1,384); 
% n=32;l=12; 
 x=zeros(n,l); 
 for i=1:n 
    for j=1:l 
        x(i,j)=ga_pop((i-1)*l+j); 
    end 
 end 
 y=x'; 
clear i j;   
end