Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

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)=f​profit(x0(​i,:));"

1 view (last 30 days)
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 Comments
Alex Mcaulley
Alex Mcaulley on 13 Jun 2019
Edited: Alex Mcaulley on 13 Jun 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

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!