fminsearch with integer parameters

조회 수: 3 (최근 30일)
Nathalie
Nathalie 2014년 5월 2일
댓글: Nathalie 2014년 5월 6일
Hi, i have problem with fminsearch. One of the parameters is the point on the grid.
When i use fminsearch, the points can get non-integer- not lying on the grid, and then other procedures in the code do not work. When i round my parameter, fminsearch does not work, but just oscillates near some values at some point.
What can be a solution?
Thanks.

답변 (1개)

John D'Errico
John D'Errico 2014년 5월 2일
Sorry, but fminsearch is simply not an integer tool. You cannot use it for this problem. Rounding the parameter inside your objective function will NOT produce a solution. But I guess you found that out yourself.
You need to use a tool designed for integer problems, or mixed integer, if some of your parameters are continuous. Look on the file exchange.
  댓글 수: 1
Nathalie
Nathalie 2014년 5월 6일
Hi, thanks, but can i write for example loop for that only parameter, assigning to it only points lying on the grid and write then all the optimization routine in this loop. So that code would choose only values for these parameter belonging to the grid and not other. how do you think will it work? Is it possible t oconstrain the values parameters can take to some range of values? Thanks.

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

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by