please i need a help in a matlab program using GA if anyone can help me please tell me and i will send the program to him/her it is about how to improve the performance of linear array using GA thanks
1 回表示 (過去 30 日間)
古いコメントを表示
function CF =fnbwd1(w) N =12; % number of elements in array m=0; d=0.5; for m=m+1
theta = 0:.01:pi;
AF1 = zeros(1,length(theta));
for i = 1:N/2
%AF1=AF1+w(i)'.*cos(((2*i)-1)*(pi*w(7)*cos(theta)));
AF1=AF1+w(i)'.*cos(((2*i)-1)*(pi*d*cos(theta)));
end AF1=2*AF1; [Maxima,MaxIdx] = findpeaks(abs(AF1)); DataInv = 1.01*max(abs(AF1)) - abs(AF1); [Minima,MinIdx] = findpeaks(DataInv) Minima = AF1(MinIdx); theta1=0:(180*0.01/pi):180; [MinAngles]=theta1(MinIdx) %h=MinAngles((110*pi/180)>MinAngles & MinAngles>(pi/2)) %l=MinAngles((pi/2)>MinAngles & MinAngles>(80*pi/180)) h=MinAngles(MinAngles>90) l=MinAngles(90>MinAngles) l1= fliplr(l) for x1=1:length(h) for x2=1:length(l1)
FNBW=h(x1)-l1(x2)
end
end
for x=1:length(FNBW)
CF=abs(FNBW(x)-19.4806)
end
end end
1 件のコメント
Geoff Hayes
2014 年 9 月 17 日
Marian - please format the above code so that it is readable (or just attach it to your question using the paperclip button).
Is this code your fitness function for the genetic algorithm? Are you using the GA software from the Global Optimization Toolbox?
What do you mean that you want to improve the performance of linear array using GA? Is it that the solution is converging prematurely, or is not working, or ..?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!