Change fmincon from local to global search

3 次查看(过去 30 天)
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
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