Numerical Methods Library for OCTAVE
Numerical Methods Library for OCTAVE
Numerical Methods Library for OCTAVE
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
less interchangeably, with the obvious meaning. Thus, this problem is often referred to as rootfinding or zero finding. In discussing numerical methods <strong>for</strong> solving nonlinear equations, wewill distinguish two cases:andf : R → R (scalar), (3)f : R n → R n (vector). (4)The latter is referred to as a system of nonlinear equations, in which we seek a vector xsuch that all the component functions of f (x) are zero simultaneously.3.3.1 BisectionX = BISECTION(FUN,A,B,ITMAX,TOL) tries to find a zero X of the continuousfunction FUN in the interval [A, B] using the bisection method. FUN acceptsreal scalar input x and returns a real scalar value. If the search failsan error message is displayed. FUN can also be an inline object.[X, RES, NBIT] = BISECTION(FUN,A,B,ITMAX,TOL) returns the value of the residualin X solution and the iteration number at which the solution was computed.ParametersFUN evaluated function.A,B [A,B] interval where the solution is computed, A < B and sign(FUN(A))= - sign(FUN(B)).ITMAX maximal number of iterations.TOL tolerance on the stopping criterion.ReturnsX computed solution.NBIT number of iterations to find the solution.RES value of the residual in X solution.3.3.2 Fixed-pointX = FIXED_POINT(FUN,X0,ITMAX,TOL) solves the scalar nonlinear equation suchthat ’FUN(X) == X’ with FUN continuous function. FUN accepts real scalarinput X and returns a real scalar value. If the search fails an error messageis displayed. FUN can also be inline objects.[X, RES, NBIT] = FIXED_POINT(FUN,X0,ITMAX,TOL) returns the norm of the residualin X solution and the iteration number at which the solution was computed.ParametersFUN evaluated function.DFUN f’s derivate.10