How to adjust dimension in xx
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
function f = watch2(b,x,M,n,lb,ub,costfun)
xx=zeros(M,n);
for i=1:M
for j=1:n
xx(i,:)= (x(i,j) - b)+ ((x(i,j) + b)-(x(i,j)-b)).*rand;
end
end
xx;
if ob(xx)<ob(x)
x(i,:)=xx(i,:);
end %fw=xx
f=lb+(ub-lb).*x;
end
0 commentaires
Réponses (1)
KSSV
le 22 Mar 2022
for i=1:M
for j=1:n
xx(i,j)= (x(i,j) - b)+ ((x(i,j) + b)-(x(i,j)-b)).*rand;
end
end
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!