Is there a way to make fzero reuse values from interval search
1 次查看(过去 30 天)
显示 更早的评论
This post is half question, half update request...
When calling fzero with only a starting point, not an interval, is there a way to make fzero reuse/recycle the values it has calculated during the initial interval search. I'm guessing not, however the function I'm finding the root of is expensive, and fzero takes ages to execute. See the example output below. At the last iteration of the interval search, fzero has come very close to having the correct answer with a=102.885 and f(a)=79.5417. However, after an interval is identified, fzero then begins the zero search in the interval [99.1788, 120.778]. Surely it would make more sense to use the interval [99.1788, 102.885] because this brackets the solution much more closely. Or is using a smaller interval not possible because the underlying numerical method uses three points.
Search for an interval around 111.831 containing a sign change:
Func-count a f(a) b f(b) Procedure
1 111.831 1.48227e+06 111.831 1.48227e+06 initial interval
3 108.668 956222 114.994 2.00547e+06 search
5 107.358 737493 116.304 2.22137e+06 search
7 105.505 427326 118.157 2.52586e+06 search
9 102.885 79.5417 120.778 2.95484e+06 search
10 99.1788 -626531 120.778 2.95484e+06 search
Search for a zero in the interval [99.1788, 120.778]:
Func-count x f(x) Procedure
10 99.1788 -626531 initial
11 102.957 12343.2 interpolation
12 102.957 12343.2 interpolation
Zero found in the interval [99.1788, 120.778]
Solver terminated with area 102.9574
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!