{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

07 - Lecture 7 Todays class Functions in Matlab Simple...

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

View Full Document Right Arrow Icon
Lecture 7 Today’s class: Functions in Matlab Simple functions (m-file 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
Background image of page 1

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

View Full Document Right Arrow Icon
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
Background image of page 2
Plotting functions in 2 ways
Background image of page 3

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

View Full Document Right Arrow Icon
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
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}