how to perform a multi variable optimization on matlab
25 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
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))
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!