MATLAB_lab2

MATLAB_lab2 - MATLAB - Solving a Nonlinear Equation In the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MATLAB - Solving a Nonlinear Equation In the last lab we learned some basic MATLAB commands and learned how to write two types of M-files - scripts and functions. In addition, we solved a nonlinear equation using the Bisection method. In this lab we will learn some new commands and solve some nonlinear equations using the Regula Falsi, secant and Newtons methods. New commands : feval while pause 1. You can download a Regula Falsi function from our web page or write your own. The code on our web page is complete except that it performs a fixed number of iterations and has no other stopping criteria. Its usually a good practice to have a fixed number of iterations in case your stopping criteria is never met. Add to the code the stopping criteria of checking the function value (we discussed this in class on Tuesday) Test your code by finding the root of f ( x ) = x cos x with starting values of 0 and 1. Use 10 5 as your tolerance for the stopping criteria....
View Full Document

This note was uploaded on 12/14/2011 for the course FIN 5515 taught by Professor Staff during the Spring '10 term at FSU.

Page1 / 2

MATLAB_lab2 - MATLAB - Solving a Nonlinear Equation In the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online