function [conver_result,Final_result,all_result]=imayfly_process(datapass,pop_size,no_of_iter) traindata=datapass{1}; traindata_matrix=cell2mat(traindata); len_data=max(max(traindata_matrix)); max_val1=1; min_val1=0; dim=len_data; max_range=[repmat(max_val1,[1 dim])]; min_range=[repmat(min_val1,[1 dim])]; len=length(max_range); int_pos_data=init_pop_data(pop_size,len,max_range,min_range); data_pass_to{1}=[]; for indr=1:pop_size dataele=(int_pos_data(indr,:)); dataele=limit_chk_process(dataele,... max_val1,min_val1,data_pass_to); elechoose=dataele; obj_result=objective_process(datapass,elechoose); int_pos_data(indr,:)=dataele; fitness(indr)=obj_result{1}; finalall{indr}=obj_result; end [maxval,maxloc]=max(fitness); bestdata=int_pos_data(maxloc(1),:); bestfit=maxval; xg=bestdata; gbestdata=int_pos_data(maxloc(1),:); gbestfit=maxval; xhi=gbestdata; [rr,cc]=size(int_pos_data); initvel=ones(rr,cc)*0.01; iter_inc=1;% Loop counter % Main loop data_pass_to{1}=0; while iter_inc<=no_of_iter gdata=linspace(1,0.1,pop_size); for kpop=1:pop_size xit=int_pos_data(kpop,:); if(fitness(kpop)>gbestfit) a1=rand;a2=rand;betaval=rand; rpdata=norm(bestdata-int_pos_data(kpop,:),2); rgdata=norm(gbestdata-int_pos_data(kpop,:),2); f1=gdata(kpop)*initvel(kpop,:); f2=a1*exp(-betaval/rpdata)*(xhi-xit); f3=a2*exp(-betaval/rgdata)*(xg-xit); newvel=f1+f2+f3; else dval=rand;rval=randn; newvel=gdata(kpop)*initvel(kpop,:)+dval*rval; end initvel(kpop,:)=newvel; end int_pos_data=int_pos_data+initvel; %Male for indr=1:pop_size dataele=(int_pos_data(indr,:)); dataele=limit_chk_process(dataele,... max_val1,min_val1,data_pass_to); elechoose=dataele; obj_result=objective_process(datapass,elechoose); int_pos_data1(indr,:)=dataele; fitnessl(indr)=obj_result{1}; finalall{indr}=obj_result; end for kpop=1:pop_size xit=int_pos_data(kpop,:); yit=int_pos_data1(kpop,:); if(fitness(kpop)=2 && best_conver_data(iter_inc)