Does the Optimization Toolbox solve the problems wothout assigning values for the parameters?
이전 댓글 표시
Hi,
For the Optimization Toolbox, is it possible to obtain the optimal solution as a function of parameters? To illustrate, consider the following problem:
minimize (x1-x2) such that x1+x2=C
Here the optimal solution is x1=x2=C/2. Is it possible to obtain that solution without assigning a value for C?
Thanks in advance...
댓글 수: 1
Matt J
2013년 5월 13일
Incidentally, the example problem you showed has no finite minimum. Possibly, you meant to write the following quadratic problem
minimize (x1-x2)^2 such that x1+x2=C
채택된 답변
추가 답변 (1개)
Shashank Prasanna
2013년 5월 14일
If you want a symbolic answer you must use the symbolic toolbox. Optimization Toolbox is for numerical solutions only.
>> [X1 X2] = solve((x1-x2)^2==0,x1+x2==C)
X1 =
C/2
X2 =
C/2
카테고리
도움말 센터 및 File Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!