Difference between revisions of "MATLAB talk:Fzero"
Faraz.yashar (talk | contribs) |
Faraz.yashar (talk | contribs) |
||
Line 4: | Line 4: | ||
{{Q}} Is there any way to ignore errors and force a script to continue otherwise instead of trying to avoid specific errors from ever occurring with if statements? Consider the circumstance when looping through sets of intervals for fzero. Some intervals may yield an error. Can I just say, "Forget about it?": ignore the error and see what's up with the next set of values. | {{Q}} Is there any way to ignore errors and force a script to continue otherwise instead of trying to avoid specific errors from ever occurring with if statements? Consider the circumstance when looping through sets of intervals for fzero. Some intervals may yield an error. Can I just say, "Forget about it?": ignore the error and see what's up with the next set of values. | ||
+ | |||
+ | 05:34, 19 November 2010 (EST) |
Revision as of 10:34, 19 November 2010
It should be noted that fzero is incapable of calculating zeros that merely touch the x-axis instead of crossing it Furthermore, fzero freaks out when it runs into an interval with an asymptote (Inf) or non a number (NaN). To quote: "The function values at the interval endpoints must differ in sign" and "Exiting fzero: aborting search for an interval containing a sign changebecause NaN or Inf function value encountered during search."
Is there any way to ignore errors and force a script to continue otherwise instead of trying to avoid specific errors from ever occurring with if statements? Consider the circumstance when looping through sets of intervals for fzero. Some intervals may yield an error. Can I just say, "Forget about it?": ignore the error and see what's up with the next set of values.
05:34, 19 November 2010 (EST)