How to adjust dimension in xx

5 vues (au cours des 30 derniers jours)
jazba hafeez
jazba hafeez le 22 Mar 2022
Réponse apportée : KSSV le 22 Mar 2022
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

Réponses (1)

KSSV
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

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by