Info

此问题已关闭。 请重新打开它进行编辑或回答。

writing correct fitness function for GA

1 次查看(过去 30 天)
segun
segun 2014-3-15
关闭: MATLAB Answer Bot 2021-8-20
Hi Friends, Please can anyone help me correct this GA code to minimimize measured and predicted results to extract the three parameters.I got an error message when I run it on matlab GA tool. function Ap = insertionlossnew(x) L1=3; Zcd1=x(1); L2= 24; Zcb=x(2); L3=3; Zcd2=x(3); Ap=eye(1); for f=[1 4 8 10 16 20 25 31.25 62.5 100 200 250 300 400 500]; Ap = (f*((L1)*(Zcd1)+(L2)*(Zcb)+(L3)*(Zcd2))); end Am=[20.3 23.4 24.6 25.3 23.4 26.4 27.5 22.9 23.7 29.8 31.3 32.8 27.9 25.8 35.6]; Y1=sqrt(sum(Ap-Am)^2); Y2=mean(Am,15); disp(Y2); Y3=sqrt(sum(Am-Y2)^2); Y4=Y1/Y3; Y=(1-Y4)*100; disp(Y);

回答(0 个)

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by