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!





