필터 지우기
필터 지우기

in every run i am getting different value of x..????

조회 수: 1 (최근 30일)
ash
ash 2018년 4월 7일
댓글: John BG 2018년 4월 7일
xdata =[ 1 2 3 4 5 6] ; ydata=(1./(xdata.^2+2*xdata+4)); FitnessFunction = @(x) sum((x(1)./(x(2).*xdata.^1.9+x(3).*xdata.^0.9+1)-ydata).^2); numberOfVariables = 3; x =ga(FitnessFunction,numberOfVariables)
  댓글 수: 1
John BG
John BG 2018년 4월 7일
your call of ga is equivalent to
x =ga(@(x) sum((x(1)./(x(2).*xdata.^1.9+x(3).*xdata.^0.9+1)-ydata).^2),numberOfVariables)
does it make sense to you to choose a different names for the input variable in the function parameter for the ga optimization toolbox, and the output of ga?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Direct Search에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by