Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Math Expert


Home >> Math

Assignment - Root Finding with the Secant Algorithm

Preliminary Information

In this assignment you will write a script and a function to implement the secant algorithm.

The function will implement the secant algorithm and return the root of the function.

The script will define the required data and send the data to the function.  Included in the required data there should be a string that defines the required function as an anonymous function.  The string can be converted into a function handle using MATLAB's str2func function.

After the root is returned from the secant function is should be written to a data file on disk with 6 decimal places.  The data file should read:

The root = (value_of_root)

For your function use

f(x) = 2 - 2log(x) - √x

Goals:

-Writing numerical analysis software

-The use of anonymous functions

-I/O to disk files

Reading Assignment:  Recommended reading from MATLAB help documentation:

-str2func

-fopen

-fprintf

-fclose

Note:  you should write the output to a file in your current directory.

What to Submit-

You are required to upload the following files to Blackboard

1) Your script M-file.

2) Your secant function M-file.

3) A documentation file.

You should note that your documentation file is extremely important.  It is this information that users of your software will consult when running your software.  Too many programmers make extreme efforts writing and testing software and then fail to provide proper documentation.  This hinders the use of your software and prevents users from gaining the full benefits of your hard work.

All you M-file should contain comments explaining how the program works.  In addition, you should include the follows:

File name

Description

Program variables

Programmer

Student number

Date

Your documentation file should contain the following information:

Programmer

Student number

Date

File software names of all your programs

Description of program

Instructions on how to run the program.

Math, Academics

  • Category:- Math
  • Reference No.:- M91793436

Have any Question?


Related Questions in Math

Questions -q1 prove the following identitiesa sinx y sinx

Questions - Q1. Prove the following identities a. sin(x + y) + sin(x - y) = 2 sin x cos y b. sec(x - y) = cos(x + y)/(cos 2 x - sin 2 y) c. tan 2 x - sin 2 x = (tan x sin x) 2 Q2. Solve the following equations for x ∈ [0 ...

Assignment - solving the five question in the very details

Assignment - Solving the five question in the very details, thanks a lot. Question - Let a ∈ P n be a point. Show that the one-point set {a} is a projective variety, and compute explicit generators for the ideal I p ({a} ...

Question 1 what is the nth order approximation using taylor

Question: 1. What is the nth order approximation using Taylor series? 2. What is Error Propagation? 3. Please explain what the total numerical error is? Please illustrate how the change of step size will affect the total ...

Maths assignment - 1 analysis of a data setusing a

Maths Assignment - 1. Analysis of a data set Using a continuous data set you are requested to collect in the types of data and gathering data section, perform a statistical analysis on your data. You have opportunities t ...

Instructionsthe aim of the assignment is that the

Instructions The aim of the assignment is that the student/group studies and applies numerical methods such as Euler's method, the Improved Euler's method and the Runge-Kutta method to solve first-order differential equa ...

Assessment taskpractical investigation- question 1 requires

Assessment Task Practical Investigation - Question 1 requires selecting reference points from the graph. It is expected that each student will choose different reference points to other students. Take note of the criteri ...

Mathematics- algebraic geometry problemlet k denotes an

Mathematics- Algebraic Geometry Problem Let K denotes an algebraically closed field and let P 1 be constructed as in Example 5.5(a) in Gathmanns notes, i.e. P 1 is the gluing of X 1 = A 1 and X 2 = A 1 along  the open su ...

Clarity succinctness writing your name and netid1

Clarity, succinctness, writing your name and Netid: 1 Indistinguishability 1. If {X n }n is computationally indistinguishable from {Y n } n , {Y n } n is computationally indistin- guishable from {Z n } n, then (select th ...

1 suppose that n 10088821 is a product of two distinct

1. Suppose that n = 10088821 is a product of two distinct primes, and Φ(n) = 10082272. Determine the prime factors of n. 2. It is easy to show that the converse of Fermat's Theorem does not hold; i.e., the congruence a n ...

Question 1 - for the ivp of ode y t-1e-y y1 0 find an

Question 1 - For the I.V.P of ODE y' = (t-1)e -y , y(1) = 0, find an approximation to y(1.2) using the following numerical methods with Δt = 0.1. Compare the numerical solution with the exact solution and compute the err ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As