Optimizing a function with a vector as input
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Víctor García
am 18 Mai 2021
Bearbeitet: Matt J
am 19 Mai 2021
Hi everyone,
I have a function with an input of 6 values (6 periods of power) and only one output, the price. I would like to optimize the output value (minimize it) changing the input, but I have found no information about how to optimize with a vector as an imput instead of an scalar. I already tried with fminsearch or optimproblem, but none worked.
Thank you in advance!
0 Kommentare
Akzeptierte Antwort
Matt J
am 18 Mai 2021
There is no reason why an OptimizationVariable can't be vector-valued, e.g.,
P=optimvar('P',[6,1]);
size(P)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!