Write a script and a function to implement secant algorithm

Assignment Help Mathematics
Reference no: EM131069063

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.

Reference no: EM131069063

Questions Cloud

Average monthly compound rate of change : Property A sold 22 months ago for $98,500; it sold last week for $108,000. Property B sold 20 months ago for $105,000; it sold two weeks ago for $113,500. What is the average monthly compound rate of change in sale prices?
How will transition impact functioning of the family unit : Examine their functioning in relation to a model of resilience appropriate to your specialization, and evaluate their challenges and strengths related to wellness and resilience. As each character transitions to his or her next developmental stage..
What is the effective cost of credit to worthington : How would I put that in a essay format? Worthington, Inc. is planning to issue $7,500,000 in 120-day maturity notes carrying a rate of 11 percent per year. Worthington's commercial paper will be placed at a cost of $35,000. What is the effectiv..
Principles of management select the single best answer : 1Rajis assigned to hold apress conference that discusses the company's plans to Build anew plant Raj is performing the role.
Write a script and a function to implement secant algorithm : 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 funct..
What is the share price of the companys stock : Gibson Co. has a current period cash flow of $1.2 million and pays no dividends. The present value of the company’s future cash flows is $20 million. The company is entirely financed with equity and has 800,000 shares outstanding. Assume the dividend..
What you intend to persuade the reader to think and do : State the purpose of your report, i.e. what you intend to persuade the reader to think and/or do. Then describe what you will address first as you attempt to overcome possible resistance and persuade them of the merits of your viewpoint and/or req..
What is the expected return on the portfolio : You own a portfolio that has $1,400 invested in Stock A and $1,000 invested in Stock B. If the expected returns on these stocks are 10% and 14%, respectively, what is the expected return on the portfolio?
Strategy and calculate the hedged value : (a) Explain the strategy and calculate the hedged value of GE's cash flow using a forward market hedge. (b) Explain the strategy and calculate the hedged value of GE's cash flow using a money market hedge.

Reviews

Write a Review

Mathematics Questions & Answers

  Questions on ferris wheel

Prepare a Flexible Budget Gator Divers is a company that provides diving services such as underwater ship repairs to clients in the Tampa Bay area.

  Logistic map

This assignment has two question related to maths. Questions are related to bifurcation cascade and logistic map.

  Finding the probability of cards

This assignment has questions related to probabiltiy.

  Systems of ode

Find all the xed points, and study their stability and Draw the phase portrait of the system, as well as the graphs of the solutions in all relevant cases.

  Derive the boolean expression

Derive the Boolean Expression and construct the switching circuit for the truth table stated

  System of equations

Evaluate which equations are under-identified, just-identified, and over-identified.

  Linear programming problem

Linear programming problem consisting of only two constraints with one objective function.

  Find the natural domain

Find the natural domain of the given functions.

  Introduction to numerical methods

Compute the coecients of the polynomials using the term recurrence relation.

  Chart of the topological manifold

De?nition of smoothness of functions on a smooth manifold is chart independent and hence geometric.

  Mathematics in computing

Questions related on mathematics in computing.

  Complex problems

Complex problems

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd