필터 지우기
필터 지우기

how to find the value fmincon is trying

조회 수: 1 (최근 30일)
xueqi
xueqi 2013년 11월 26일
댓글: Walter Roberson 2013년 11월 26일
Hi fellows,
I am using fmincon to find the minimum of function f. Sometimes it gets a value of f is NaN , so fmincon fails to converge. Do you know how to find what value that fmincon is trying when it gets f as NaN?

답변 (1개)

Walter Roberson
Walter Roberson 2013년 11월 26일
At the command prompt give the command
dbstop if infnan
and run. When it stops you can examine the parameters passed in to your function.
  댓글 수: 2
xueqi
xueqi 2013년 11월 26일
Hey. Could you also tell me how to examine the parameters? I am not sure where to find them....
Walter Roberson
Walter Roberson 2013년 11월 26일
Look at
whos
and look at the parameter names you gave when you wrote the function and ask to look at those parameters. "x" is pretty common for this purpose.

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

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by