MATLAB: I get this error when I try to give different upper and lower bounds in mopso ? How to correct this

MATLABmopso

In an assignment A(I) = B, the number of elements in B and I must be the same.
Error in Mutate (line 32) xnew(j)=unifrnd(lb,ub);
Error in mopso (line 115) NewSol.Position=Mutate(pop(i).Position,pm,VarMin,VarMax);
Error in main (line 17) mopso;

Best Answer

Try :
A(I) = B(I)