Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Hii all,As I had earlier having issues with array size,I tried to resolve it;but again I m getting error message in the line "f0(i,1)=fprofit(x0(i,:));"
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
m=4;
n=100;
wmax=0.9
wmin=0.4
c1=2;
c2=2;
maxite=1000;
maxrun=10;
for run=1:maxrun
for i=1:n
for j=1:m
x0(i,j)=round(LB(j)+rand()*(UB(j)-LB(j)));
end
end
x=x0;
v=0.1*x0;
for i=1:n
f0(i,1)=fprofit(x0(i,:));
end
2 comentarios
Alex Mcaulley
el 13 de Jun. de 2019
Editada: Alex Mcaulley
el 13 de Jun. de 2019
What are LB, UB, fprofit?
What is the reason of using this loop? You don't use variable run for anything...
for run=1:maxrun
What is the complete error message?
By the way, in this line:
f0(i,1)=fprofit(x0(i,:));
you are assigning an array to a scalar
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!