Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement in Matlab the secant method for finding roots by modifying the newtraph.m code discussed in class (which implements the Newton-Raphson method). function [root, ea,

Implement in Matlab the secant method for finding roots by modifying the newtraph.m code discussed in class (which implements the Newton-Raphson method).

image text in transcribed

function [root, ea, iter]=newtraph(func,dfunc, xr, es,maxit,varargin) % newtraph: Newton-Raphson root location zeroes % [root, ea, iter]=newtraph(func,dfunc,xr, es,maxit,p1,p2, ...): uses Newton-Raphson method to find the root of func % input: func = name of function % dfunc = name of derivative of function xr = initial guess es = desired relative error (default = 0.0001%) maxit = maximum allowable iterations (default = 50) p1,p2,... = additional parameters used by function % output: % root = real root ea = approximate relative error (%) iter = number of iterations if (nargin= maxit) break end end root = xr

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago