Chapter5-5d - TheEndofOurStoryon Functions...

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

View Full Document Right Arrow Icon
The End of Our Story on  Functions
Background image of page 1

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

View Full DocumentRight Arrow Icon
The scope of a function The scope of a function are the locations within  Matlab where that function can be called. The  scope of an ordinary function is the current  working directory. If the function lies in a  directory on the Matlab path, then the scope  of the function extends to all Matlab function  in a program, since they check the path when  trying to find a function with a given name. The scope of the functions we’ll talk about today is more limited than this (by design).
Background image of page 2
You can put more than one function in the same file in Matlab. If you do this the top file is the  primary function and the ones below are  subfunctions. The code looks the same BUT  only the primary function can be called from  the outside. The scope of the secondary  functions is limited to the primary functions 
Background image of page 3

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

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

This note was uploaded on 09/13/2010 for the course EGR EGR115 taught by Professor Newman during the Spring '10 term at Embry-Riddle FL/AZ.

Page1 / 6

Chapter5-5d - TheEndofOurStoryon Functions...

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

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