how to perform a multi variable optimization on matlab
이전 댓글 표시
i have a two variable cost function to minimize,is there specefic type of optimization to do it , i am trying some metaheuristics and when introducing the second variable it shows "not enough input variables" any recommendations please ? thank you
댓글 수: 4
Dyuman Joshi
2024년 2월 19일
Please share the mathematical definition of the function you have to minimize, and the code you wrote which gave the error mentioned above.
Anwar
2024년 2월 19일
편집: Walter Roberson
2024년 2월 19일
Anwar
2024년 2월 19일
Walter Roberson
2024년 2월 19일
%example
nvars = 23;
fun = @(xSv) costfunction(xSv(1:10), xSv(11:nvars));
[bestxSv, fval] = ga(fun, nvars);
답변 (1개)
Walter Roberson
2024년 2월 19일
There are several different minimizers possible. Everything except fzero() -- fzero() is restricted to one variable.
fun = @(XYZ) YourFunction(XYZ(1), XYZ(2), XYZ(3))
카테고리
도움말 센터 및 File Exchange에서 Particle Swarm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!