How can I set a starting point in a situation where I have multiple variables?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Walter Roberson
2019 年 4 月 30 日
移動済み: John D'Errico
2023 年 1 月 22 日
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.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!