Programming |
Calling Functions
This section describes the following topics on how to make function calls:
What Happens When You Call a Function
When you call a function M-file from either the command line or from within another M-file, MATLAB parses the function into pseudocode and stores it in memory. This prevents MATLAB from having to reparse a function each time you call it during a session. The pseudocode remains in memory until you clear it using the clear
function, or until you quit MATLAB.
Clearing Functions from Memory
You can use clear
in any of the following ways to remove functions from the MATLAB workspace.
Syntax |
Description |
clear functionname |
Remove specified function from workspace. |
clear functions |
Remove all compiled M-functions. |
clear all |
Remove all variables and functions. |
Additional Information on Function Handles | Determining Which Function Is Called |
© 1994-2005 The MathWorks, Inc.