pattern search does not perform function calculation between iterations.
2 views (last 30 days)
I wrote a function and try to find an optimal number by using pattern search. From the message below, the function has no problem. However, as it shows that the number of Func-count does not change between iterations, which is very weired. Anyone has an idea to solve it, please advise.
Iter Func-count f(x) MeshSize Method
0 1 -78.1881 16
1 1 -78.1881 8 Refine Mesh
2 1 -78.1881 4 Refine Mesh
3 1 -78.1881 2 Refine Mesh
4 1 -78.1881 1 Refine Mesh
Alan Weiss on 14 Jun 2023
I suggest that you turn on iterative display. I suspect that most of the values patternsearch samples evaluate to NaN or Inf or complex, but cannot say without seeing more details.
MATLAB mathematical toolbox documentation