This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Lecture 7 Todays class: Functions in Matlab Simple functions (mfile and builtin) Anonymous functions Two ways of plotting functions Function functions: using functions as data Zeros of nonlinear equations The bisection method for finding zeros Functions in Matlab Functions: necessary abstraction in calculus, algebra f : A B is mapping from domain A to range B Functions useful also in programming: clean, efficient way to partition tasks into easier subtasks Two important categories of functions in Matlab : Simple functions Anonymous functions Plotting functions in 2 ways Function functions Function functions use other functions as inputs Crucial abstraction: function as a kind of data Necessary for fplot , fzero , quad , ode23 , etc. Syntax for using function functions: Use the @ symbol to prefix the name of a simple function when used as an argument in a call to a function function An anonymous function does not require the @ symbol when used as an argument in a call to a function function Rootfinding...
View
Full
Document
This note was uploaded on 06/20/2011 for the course MATH 2070 taught by Professor Aruliahdhavidhe during the Winter '10 term at UOIT.
 Winter '10
 aruliahdhavidhe
 matlab, Linear Equations, Equations

Click to edit the document details