Tfzero: Difference between revisions
(Created page with "==Purpose== Tfzero, TOMLAB fzero routine. Tfzero, TOMLAB fzero routine.\\ \\Find a zero for <math>f(x)</math> in the interval <math>[x_L, x_U]</math>. Tfzero searches for a ze...") |
No edit summary |
||
| Line 1: | Line 1: | ||
[[Category:Solvers]] | |||
{{cleanup|Clean this article.}} | |||
==Purpose== | ==Purpose== | ||
Revision as of 07:24, 11 July 2011
{{#switch: | left =
{{#switch:{{#if: | {{{smallimage}}} | }} | none =| #default =
}} {{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none | | }} }}{{
#switch:left | left =| #default = }}
{{#if:{{#if:
| {{{smallimage}}}
|
}}
| {{#if:
| {{{smallimage}}}
|
}}
| [[File:{{#switch:caution
| critical = Ambox speedy deletion.png
| important = Ambox deletion.png
| warning = Ambox content.png
| caution = Cleanup.png
| move = Ambox move.png
| protection = Ambox protection.png
| notice
| #default = Cleanup.png
}} | {{#switch:left
| left = 20x20px
| #default = 40x40px
}} |link=|alt=]]
}}{{#switch:left
| left =
| #default = | {{#if:
| {{{smalltext}}}
| Cleanup is needed
}} | {{#switch:left
| left = {{#if:
| {{{smallimageright}}}
|
}}
| #default = {{#if:
}} | {{{smallimageright}}}
|
}} |
| #default =
{{#switch: | none =| #default =
}}{{#if: | {{#ifeq:|none
|| }} }}
{{
#switch: | left =| #default = }}
{{#if:
|
| [[File:{{#switch:caution
| critical = Ambox speedy deletion.png
| important = Ambox deletion.png
| warning = Ambox content.png
| caution = Cleanup.png
| move = Ambox move.png
| protection = Ambox protection.png
| notice
| #default = Cleanup.png
}} | {{#switch:
| left = 20x20px
| #default = 40x40px
}} |link=|alt=]]
}}{{#switch:
| left =
| #default = | Cleanup is needed Clean this article. |
{{#switch:
| left =| #default = |
}}
Purpose
Tfzero, TOMLAB fzero routine.
Tfzero, TOMLAB fzero routine.\\ \\Find a zero for Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x)} in the interval Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle [x_L, x_U]} . Tfzero searches for a zero of a function Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x)} between the given scalar values Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_L} and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x_U} until the width of the interval (xLow, xUpp) has collapsed to within a tolerance specified by the stopping criterion, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle abs(xLow-xUpp) <= 2.*(RelErr*abs(xLow)+AbsErr)} . The method used is an efficient combination of bisection and the secant rule and is due to T. J. Dekker.
Calling Syntax
[xLow, xUpp, ExitFlag] = Tfzero(x L, x U, Prob, x 0, RelErr, AbsErr)
Description of Inputs
| Variable | Description |
| x_L | Lower limit on the zero x to f(x). |
| x_U | Upper limit on the zero x to f(x). |
| Prob | Structure, sent to Matlab routine ZeroFunc. The function name should be set in Prob.FUNCS.f0. Only the function will be used, not the gradient. |
| x_0 | An initial guess on the zero to f(x). If empty, x 0 is set as the middle point in [x_L, x_U]. |
| RelErr | Relative error tolerance, default 1E-7. |
| AbsErr | Absolute error tolerance, default 1E-14. |
Description of Outputs
| Variable | Description |
| xLow | Lower limit on the zero x to f(x). |
| xUpp | Upper limit on the zero x to f(x). |
| ExitFlag | Status flag 1,2,3,4,5. |
| 1: xLow is within the requested tolerance of a zero. The interval (xLow, xUpp) collapsed to the requested tolerance, the function changes sign in (xLow, xUpp), and f(x) decreased in magnitude as (xLow, xUpp) collapsed. | |
| 2: f(xLow) = 0. However, the interval (xLow, xUpp) may not have collapsed to the requested tolerance. | |
| 3: xLow may be near a singular point of f(x). The interval (xLow, xUpp) collapsed to the requested tolerance and the function changes sign in (xLow, xUpp), but f(x) increased in magnitude as (xLow, xUpp) collapsed, i.e. abs(f (xLow)) > max(abs(f (xLow - I N )), abs(f (xU pp - I N ))). | |
| 4: No change in sign of f(x) was found although the interval (xLow, xUpp) collapsed to the requested tolerance. The user must examine this case and decide whether xLow is near a local minimum of f(x), or xLow is near a zero of even multiplicity, or neither of these. | |
| 5: Too many (> 500) function evaluations used. |