Plot, fitness function.

조회 수: 6 (최근 30일)
dhiman banerjee
dhiman banerjee 2019년 11월 19일
댓글: dhiman banerjee 2019년 11월 19일
I have following data:
lb=[0.5 0.2 0.15 0.1 0.1 0.12];%%Lower limit of x(i)
ub=[2 0.8 0.5 0.35 0.3 0.4]; %%Upper Limit of x(i)
alpha=[0.00375 0.0175 0.06250 0.00834 0.0250 0.025];
beta=0.01*[200 175 100 325 300 300 ];
gama=[0 0 0 0 0 0];
fitness=0;
for i=1:size(alpha,2)
fitness=fitness+alpha(i)*(x(i)*100)^2+beta(i)*(x(i)*100)+gama(i);%%Fitness
end
F1=fitness;
I would like to plot the fitness function and all the six variables considering their limits.
Could anyone please help me?
  댓글 수: 1
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 19일
What is x here?
fitness vs??

댓글을 달려면 로그인하십시오.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 19일
편집: KALYAN ACHARJYA 2019년 11월 19일
Please note I have consider random x value here, please change as per the data. Also there is no role of gama in fitness, as gama=all elements equal to zero
lb=[0.5 0.2 0.15 0.1 0.1 0.12];%%Lower limit of x(i)
ub=[2 0.8 0.5 0.35 0.3 0.4]; %%Upper Limit of x(i)
alpha=[0.00375 0.0175 0.06250 0.00834 0.0250 0.025];
beta=0.01*[200 175 100 325 300 300 ];
gama=[0 0 0 0 0 0];
x=rand(1,6); % Choosen random
result=zeros(1,6);
fitness=alpha.*(x*100).^2+beta.*(x.*100)+gama;
plot(fitness);
  댓글 수: 3
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 19일
편집: KALYAN ACHARJYA 2019년 11월 19일
OK, then define x as per the data (six different powers of six generator)
Hope the problem is solved!
dhiman banerjee
dhiman banerjee 2019년 11월 19일
Actually I am trying to draw the search space of the fitness function considering all the lower and upper limit corresponding to each of six variables. What is the feasible way to do so?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by