how to perform a multi variable optimization on matlab
Ältere Kommentare anzeigen
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 Kommentare
Dyuman Joshi
am 19 Feb. 2024
Please share the mathematical definition of the function you have to minimize, and the code you wrote which gave the error mentioned above.
Anwar
am 19 Feb. 2024
Bearbeitet: Walter Roberson
am 19 Feb. 2024
Anwar
am 19 Feb. 2024
Walter Roberson
am 19 Feb. 2024
%example
nvars = 23;
fun = @(xSv) costfunction(xSv(1:10), xSv(11:nvars));
[bestxSv, fval] = ga(fun, nvars);
Antworten (1)
Walter Roberson
am 19 Feb. 2024
There are several different minimizers possible. Everything except fzero() -- fzero() is restricted to one variable.
fun = @(XYZ) YourFunction(XYZ(1), XYZ(2), XYZ(3))
Kategorien
Mehr zu Particle Swarm finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!