필터 지우기
필터 지우기

Genetic algorithm objective function

조회 수: 3 (최근 30일)
GEORGIOS BEKAS
GEORGIOS BEKAS 2022년 4월 19일
댓글: 嘉琦 常 2022년 4월 19일
I want to create an objective function that will be the sum of a series of 100 variables that will have a range of values between 0 and 1.
Instead writing down a sum like this:
x(1)+x(2)+ ... + x(100)
I want to find an automated way for this sum of x()s to be created.
  댓글 수: 1
嘉琦 常
嘉琦 常 2022년 4월 19일
function [lb,ub,dim,fobj] = Get_Functions_details(F)
switch F
case 'F1'
fobj = @F1;
lb=0;
ub=1;
dim=100;
end
end
function o = F1(x)
o=sum(x.^2);
end

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by