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!