Optimizing 1 equation with 7 variables
古いコメントを表示
I have the following function:
f= (a^2/x^2)-((a*(2*b))/x^2)+(2*(b^2)/y^2)+((1/x^2)-(2/y^2))*b^2+((2*(2*d)^2)/s^2)+(((y^2)^-1)-(4*x^2)^-1)*((2*z)^2);
I want to find all possible combinations of a,b,d,s,x,y,z for which f = 1 subject to the following constraints:
y<2*x
0=< a,b,d,s,x,y,z <= 1
I keep getting the "not enough input arguments" error when I try to run fmincon. Is this even a valid problem or it's too broad?
採用された回答
その他の回答 (1 件)
Alan Weiss
2021 年 9 月 20 日
0 投票
I think that you would have an easier time formulating your problem by using the problem-based approach.
However, if you really want to use the fmincon solver using its default syntax, you have to reformulate your problem so that there is just one optimization variable vector, typically called x, possibly along with other variables representing fixed parameters or data. See Writing Scalar Objective Functions and Passing Extra Parameters.
Alan Weiss
MATLAB mathematical toolbox documentation
カテゴリ
ヘルプ センター および File Exchange で Choose a Solver についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





