Problem concerning the fitness function of the genetic algorithm on MATLAB.
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone,
I need your help for this problem. The fitness function I am considering for my project is the error between two output signals of two simulink models and it has to be the smallest possibile. This is a piece of the code I wrote.
where iHF is a .mat file with dimension 2x50001, iLF is a normal output array with dimension 50001x1 and simulation.DT is the sampling time equal to 1e-5.
The formula to calculate the error is the following:
When I run the matlab code containing the optimization parameters, it gives me an error saying "Your fitness function must return a scalar value".
What should I do?
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!