How can I set a starting point in a situation where I have multiple variables?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to use the fmincon function in Optimtool.
My objective function is objecfun (w, d) and my constraint function is nonlconstr (w, d, g, x).
The number of variable w is 30(w11, w12, w13, w14, w15, w21, ... , w65), the number of d is 30(d11, d12, d13, d14, d15, d21, ... , d65), g is 6(g1, g2, g3, g4, g5, g6), and x is 3(x1, x2, x3).
I entered a value within the constraint range of each variable at the starting point, but an error of 'x0: matched dimension of the concatenated matrix' occurred.
How do I set the starting point in optimtool?
I look forward to your reply. Thank you.
9 Kommentare
Walter Roberson
am 30 Apr. 2019
Verschoben: John D'Errico
am 22 Jan. 2023
Set the upper and lower bound for the variable to 0 in order to force the variable value to be 0. It is, however, better to substitute constants into the equations and use the modified versions of those.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!