Is there a way to make fzero reuse values from interval search

1 回表示 (過去 30 日間)
men8th
men8th 2020 年 2 月 13 日
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 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by