2 部分代码
clear all
clc
SearchAgents=30;
Fun_name='F11';
Max_iterations=1000;
[lowerbound,upperbound,dimension,fitness]=Get_Functions_details(Fun_name);
[Best_score,Best_pos,SHO_curve]=sho(SearchAgents,Max_iterations,lowerbound,upperbound,dim
ension,fitness);
figure('Position',[300 300 400 300])
subplot(121)
func_plot(Fun_name);