I got this problem " Assignment has more non-singleton rhs dimensions than non-singleton subscripts " My code is:
v(m,i,j,k,l)=(-1*ones(m,i,j,k,l) + 2*rand(m,i,j,k,l))+rand*(gbest(m,i,j,k,l)-p(m,i,j,k,l));
Thank you so much!
rhs
v(m,i,j,k,l)=(-1*ones(m,i,j,k,l) + 2*rand(m,i,j,k,l))+rand*(gbest(m,i,j,k,l)-p(m,i,j,k,l));
Best Answer