MATLAB Programming/Handle/What is a handle?
A function handle is a MATLAB data type that represents a function. A typical use of function handles is to pass a function to another function.
For example, you can use function handles as input arguments to functions that evaluate mathematical expressions over a range of values. Other typical uses of function handles include:
(a) Specifying callback functions (for example, a callback that responds to a UI event or interacts with data acquisition hardware).
(b) Constructing handles to functions defined inline instead of stored in a program file (anonymous functions).
(c) Passing a function to another function (often called function functions). For example, passing a function to integration functions, such as integral
.
(d) Calling local functions from outside the main function.