error variable y in fitness function

조회 수: 1 (최근 30일)
titasari rahmawati
titasari rahmawati 2019년 5월 16일
편집: Stephan 2019년 5월 16일
how to write fitness function in matlab...
please help me.. because im write this is error:
function y=fungsi3(x)
y=2+exp(-(x(1)^2)+(y(1)^2)).*(sin(4*x(1))+cos(8*y(2)));
end

답변 (1개)

Stephan
Stephan 2019년 5월 16일
편집: Stephan 2019년 5월 16일
function y=fungsi3(x)
y=2+exp(-(x(1).^2+x(2).^2)).*(sin(4*x(1))+cos(8*x(2)));
end

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by