pattern search does not perform function calculation between iterations.
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all,
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
댓글 수: 0
답변 (1개)
Alan Weiss
2023년 6월 14일
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.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 3
Alan Weiss
2023년 6월 15일
I am no longer sure what your question is. Clearly, the iterative display shows that the function count increases each iteration. Does that solve your problem? Or is there something else? Perhaps you are confused about patternsearch scaling. You can always set the ScaleMesh option to false to have patternsearch not scale the mesh.
Alan Weiss
MATLAB mathematical toolbox documentation
참고 항목
카테고리
Help Center 및 File Exchange에서 Direct Search에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!