資源簡介
遺傳算法采用輪盤賭選擇,雙點交叉算法,實現MIMO正交波形設計。
代碼片段和文件信息
close?all;clear;clc;
overProb=0.8;??%交叉概率
mutationProb=0.01;???%變異概率
maxGeneration=1000;
popSize=60;???%種群數
CodeLength=40;??%?碼長?
N=ceil(log2(CodeLength+1));?
Register=zeros(1CodeLength);
%?traceInfo=zeros(maxGeneration4);
%?taltraceInfo=zeros(maxGeneration4);
times=1;
for?mount=1:times
%?產生種群數為popSize的初始化種群
startpop=size(popSizeCodeLength+1);
for?j=1:4:4*popSize
Register=round(rand(4N));%?寄存器初始值
startPop(j:j+31:CodeLength)=fourphase(CodeLengthRegister);
startPop(j:j+3CodeLength+1)=repmat(msrcost(startPop(j:j+31:CodeLength))41);
end
??
??%遺傳操作
endPop???????=?zeros(popSize*4CodeLength+1);?%A?secondary?population?matrix
p1???????????=?zeros(4CodeLength+1);? ???%An?individual
p2???????????=?zeros(4CodeLength+1);? ???%An?individual
done????
- 上一篇:數字圖像處理:最鄰近、雙線性、雙三次插值的MATLAB實現
- 下一篇:DBF波束形成
評論
共有 條評論