Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Secant Method using Mathlab 1. Write a MATLAB progrm that implements the Secant method for root-finding problem. The input parameter should be: the function f

Secant Method using Mathlab

1. Write a MATLAB progrm that implements the Secant method for root-finding problem.

The input parameter should be: the function f, the previous guess xn-1, the next question xn+1, an error tolerance, and the maximum number of iterations.

The program should stop when the approximate percent error is less than or equal the tolerance.

Your output should be a table where each row contains the number of iteration, the value of the root, and the percent approximate error.

2. In order to test your program to compute the root of e^-x=cos(x) +1 with tolerance 10^-6, create a main M-file where you can call you program, the necessary function(s), and that should the output of roots (to 5 significant figures)

3. Everything should work by simply running the main M-file. The output table should be printed on the screen, and your program shoud create a plot of the used function and a point representing the root

4. Your final submission should include:

a) Your M-file for question 1

b) The main M-file for question 2

c) When you run the main M-file, the output table should be printed on the screen, and a plot of the function with the root point should be created.

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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions