What is the logic behind fzero and fsolve which make fsolve's speed faster than fzero?

조회 수: 54 (최근 30일)
What is the logic behind fzero and fsolve which make fsolve's speed faster than fzero? Suppose that there is a polynomial equation, it can be solved by root function in shortest time, following by fsolve and fzero. Why is it so?

채택된 답변

Massimo Zanetti
Massimo Zanetti 2016년 10월 12일
편집: Massimo Zanetti 2016년 10월 12일
The functions fsolve and fzero are not meant to solve the same problem. Specifically:
  1. fzero: It finds the root of a function (of one variable) in an interval [a,b]. It REQUIRES that f(a)*f(b)<0. fzeros uses a combination of bisection, secant, and inverse quadratic interpolation methods. Not every polynomial can be rooted by fzero: for instance x^2 doesn't work, because it has no sign change.
  2. fsolve: solves a SYSTEM of non-linear equations F(x) where x is multivariate. It use three different methods 'trust-region-dogleg' (default), 'trust-region', and 'levenberg-marquardt', depending on user needs.
  댓글 수: 1
Dariusz Skibicki
Dariusz Skibicki 2021년 3월 23일
Thank you very much. The only sensible and simple answer. The only thing missing is the fact that fsolve is a Newtonian method.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by