Git Product home page Git Product logo

secant_method-matlab's Introduction

secant_method View Secant Method (secant_method) on File Exchange

Secant method for finding the root of a univariate, scalar-valued function.

Syntax

x = secant_method(f,x0)
x = secant_method(f,x0,opts)
[x,k] = secant_method(__)
[x,k,x_all] = secant_method(__)

Description

x = secant_method(f,x0) returns the root of a function specified by the function handle f, where x0 is an initial guess of the root.

x = secant_method(f,x0,opts) does the same as the syntax above, but allows for the specification of optional solver parameters. opts is a structure with the following fields:

  • k_max → maximum number of iterations (defaults to 200)
  • return_all → returns estimates at all iteration if set to true (defaults to false)
  • TOL → tolerance (defaults to )

[x,k] = secant_method(__) also returns the number of iterations (k) performed of the secant method.

[x,k,x_all] = secant_method(__) does the same as the previous syntaxes, but also returns an array (x_all) storing the root estimates at each iteration. This syntax requires that opts.return_all be set to true.

Examples and Additional Documentation

  • See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.
  • See "Root_Finding_Methods.pdf" (also included with download) for the technical documentation.

secant_method-matlab's People

Contributors

tamaskis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.