필터 지우기
필터 지우기

Initial values for fmincon

조회 수: 2 (최근 30일)
Ayesha Maroof
Ayesha Maroof 2018년 12월 21일
편집: Matt J 2018년 12월 26일
I am trying to get the minimum value of a function using fmincon function but I have no guesses about the initial values.So what values should I provide at x0 so that it can be converged to minimum value? i am initiallly giving some values and also getting hessian matrix which is showing some positive and some negative numbers which is a proof that the obtained value is not minimum of function.
  댓글 수: 4
Ayesha Maroof
Ayesha Maroof 2018년 12월 21일
ok thank you let me look at it.Right now i am getting this :
"Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the function tolerance,
and constraints are satisfied to within the default value of the constraint tolerance."
Though it says the local minimum found but Hessian matrix which i am getting is having both positive and negative values.I want all values to be positive so that it proves that the obtained function has been minimized
hessian =
0.8272 -0.1404 -0.0622 0.7519 -1.6917 -0.3578 2.0148 -0.0462 -0.0961
-0.1404 0.0367 -0.0430 -0.1227 0.2787 0.0611 -0.3385 -0.0045 0.0089
-0.0622 -0.0430 0.2765 0.0881 -0.1224 0.0669 0.3099 0.0407 0.0354
0.7519 -0.1227 0.0881 2.2642 -3.9153 -0.7057 4.5789 0.2219 0.2032
-1.6917 0.2787 -0.1224 -3.9153 7.2666 1.3976 -8.6220 -0.0511 0.0025
-0.3578 0.0611 0.0669 -0.7057 1.3976 1.3033 -1.8609 0.0115 -0.0557
2.0148 -0.3385 0.3099 4.5789 -8.6220 -1.8609 11.6125 -0.0301 0.0617
-0.0462 -0.0045 0.0407 0.2219 -0.0511 0.0115 -0.0301 0.3722 0.3274
-0.0961 0.0089 0.0354 0.2032 0.0025 -0.0557 0.0617 0.3274 0.4120
Alan Weiss
Alan Weiss 2018년 12월 26일
Just because some values are negative doesn't mean that the resulting Hessian isn't positive semidefinite. In fact, when I asked MATLAB to calculate the eigenvaljes of your matrix, it gave me
vals = eig(A)
vals =
0.0000
0.0034
0.0490
0.2203
0.4015
0.7076
0.9154
1.0405
21.0335
See, all positive.
HOWEVER, in general the returned values of the Hessian are NOT RELIABLE. See fmincon Hessian.
Alan Weiss
MATLAB mathematical toolbox documentation

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by