Programming |
Calling Nested Functions
You can call a nested function
You can also call a subfunction from any nested function in the same M-file.
You can pass variable numbers of arguments to and from nested functions, but you should be aware of how MATLAB interprets varargin
, varargout
, nargin
, and nargout
under those circumstances. See Passing Optional Arguments to Nested Functions in the MATLAB Programming documentation for more information on this.
Note If you construct a function handle for a nested function, you can call the nested function from any MATLAB function that has access to the handle. See Using Function Handles with Nested Functions. |
Nested Functions | Variable Scope in Nested Functions |
© 1994-2005 The MathWorks, Inc.