function X=initialization(SearchAgents_no,Dim,UB,LB)
Boundary_no= size(UB,2); 
% If the boundaries of all variables are equal
if Boundary_no==1
    X=rand(SearchAgents_no,Dim).*(UB-LB)+LB;  
end
% If each variable has a different lb and ub
if Boundary_no>1
    for i=1:Dim
        UB_i=UB(i);
        LB_i=LB(i);
        X(:,i)=rand(SearchAgents_no,1).*(UB_i-LB_i)+LB_i;
    end
end