Change fmincon from local to global search

조회 수: 3 (최근 30일)
Benjamin
Benjamin 2021년 3월 11일
댓글: Benjamin 2021년 3월 11일
Hello
Dear all experts,
I have a code that uses fmincon to minimize a parameter (i.e. alpha), however, the program does not try different values for alpha, and show the initial adopted value as the output. I read in another topic that finding a global search, rather than a local minimum search could solve this problem. But I don't know how to change the fmincon to search for the global answers. I also used the approach here, but it doesn't work. I attached my code files, and I really appreciate it if you help me.
Thanks
  댓글 수: 2
Jan
Jan 2021년 3월 11일
fmioncon is a local optimizer. You cannot convert it to a global one, because this is a completely different approach. you cannot change your bike to act like a typing machine also.
I also used the approach here, but it doesn't work.
Then please post your code and explain, what "does not work" mean. We cannot guess this important detail. Using a global optimizer is the correct way, so lets solve the occurring problems.
Benjamin
Benjamin 2021년 3월 11일
Thanks @Jan for your clarification.
Regards.

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

채택된 답변

Benjamin
Benjamin 2021년 3월 11일
I changed the code to implement lsqcurvefit instead of fmincon and I was able to fix the problem. That means in my problem I did not need to search for a global search. Here I put the modified files just in case someone got into the same problem as me, and hopefully that helps.

추가 답변 (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