Function Handles UC Berkeley Fall 2004, E Copyright 2005, Andy Packard

Slides:



Advertisements
Similar presentations
Scientific Communication Life-cycle model
Advertisements

Lecture 5.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
More on Functions… Lecture 8. Preserving Data between Calls to a function Persistent statement is declared in order to preserve some local information.
Solving Equations = 4x – 5(6x – 10) -132 = 4x – 30x = -26x = -26x 7 = x.
Trees UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Spring R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Return HomeworkReturn Homework Class ScheduleClass Schedule Functions:
Solving ODEs UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Functions UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
© Steve Powell 1998: verbs in colour 1 This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of.
Numerical Integration UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
Solving Linear Equations UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
Debugging UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Time Complexity UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Regression UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Simulink SubSystems and Masking April 22, Copyright , Andy Packard. This work is licensed under the.
Cell Arrays UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Recursion and Induction UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the.
HandleGraphics Intro UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Sorting UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Script Files UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Objects and Classes UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Numerical Differentiation UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under.
IEEE Arithmetic UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Searching UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Struct Arrays UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Analyzing Functions (4.16) y=f(x) MATLAB. Functional Analysis includes: Plotting and evaluating a function Finding extreme points Finding the roots (zeros.
Polynomials UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
Basics of Matlab UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
More Functions in MATLAB. Functions that operate on other functions A function F() can take another function G() as an argument by using a notation:
Intro to Simulink April 15, Copyright , Andy Packard. This work is licensed under the Creative Commons.
Inheritance in Matlab Classes E177 February 14, Copyright , Andy Packard. This work is licensed.
Open Access and Free Journals In OutLook OnLine: A Demonstration
Simulink Model Commands April 11, Copyright 2005, Andy Packard. This work is licensed under the Creative.
Basis of Mathematical Modeling LECTURE 3 Numerical Analysis with MATLAB Dr. N.K. Sakhnenko, PhD, Professor Associate.
Root Finding UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Get/Set Methods UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Intro to Simulink Modified by Gary Balas 20 Feb 2011 Copyright , Andy Packard. This work is licensed under.
Introduction to CMex E177 April 25, Copyright 2005, Andy Packard. This work is licensed under the Creative.
E177, Rules of Interruptibility of Callbacks March 4, Copyright , Andy Packard. This work is licensed.
Copyright Crash Course Laura Rivera EDTC
Black Box Software Testing Spring 2005
FAST TRACKING IN THE IEEE
Introduction to Java E177 April 29, me. berkeley
Copyright Notice This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license,
Black Box Software Testing Spring 2005
Welcome to course DT2350 Human Perception for Information Technology
For/Switch/While/Try UC Berkeley Fall 2004, E77 me
ME190L Nyquist Stability Criterion UC Berkeley Fall
Features Catalyst is the releng building tool It's used to build official releases Is being used to build weekly releases for > 2 years Supports many arches.
Who is Jorge Manuel B. S. Vicetto (jmbsvicetto)?
Keep it Open: Building Public Sites in the Wild
Reusable Graphics Objects UC Berkeley Fall 2004, E77 me
Class Info E177 January 22, me. berkeley
Local Gain Analysis of Nonlinear Systems
Regular Expressions: Searching strings for patterns April 24, 2008 Copyright , Andy Packard and Trent Russi. This work is licensed under the Creative.
E177, Graphics Objects in Matlab February 26, me
@ReferAssignGetSet February 21, me. berkeley
Black Box Software Testing Fall 2004
Black Box Software Testing Fall 2005 Overview – Part 1 of 3
Lecture Notes: Spatial Convolution
Black Box Software Testing 2004 Academic Edition
Applications of User Defined functions in MATLAB
Class Intro/TDD Intro 8/23/2005
How would you use your calculator to solve 52?
E177, Reference/Assignment for Classes: Intro February 12, Copyright , Andy Packard. This work.
Service Blueprint Canvas 1.0 Create service blueprints with ease.
Arrays in Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Basics of Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Presentation transcript:

Function Handles UC Berkeley Fall 2004, E77 http://jagger.me.berkeley.edu/~pack/e77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Function handles and feval Several Matlab functions solve your problem by repeatedly calling functions that you supply finding zeros of a function (fzero) Integrating a function (trapz, quad) Integrating a differential equation (ode45) minimizing a function (fminbnd, fminsearch) For example, in calling fzero, you must pass a reference-to-the-function (called a function handle) that you want fzero to find the zeros of. Use the @ operator to get the reference. >> shan = @sin; >> class(shan) >> feval(shan,linspace(0,pi,5)) New data type: add to list with double, cell, char, struct. Any function (built-in, mfile, etc)

Function handles and feval General syntax for feval is [out1,out2,…] = feval(FuncH,arg1,arg2,…) function handle Output argument list Input argument list