필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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 (최근 30일)
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
Alex Mcaulley
Alex Mcaulley 2019년 6월 13일
편집: Alex Mcaulley 2019년 6월 13일
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

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by