在你的程序最后加上:disp(['500次变异最大值:',num2str(max(f_max))])[~,id]=max(f_max);disp(['坐标x1:',num2str(x1(id))])disp(['坐标x2:',num2str(x2(id))])