What Is a Function Handle?

A function handle is a callable association to a MATLAB® function. It contains an association to that function that enables you to invoke the function regardless of where you call it from. This means that, even if you are outside the normal scope of a function, you can still call it if you use its handle.

With function handles, you can:

  • Pass a function to another function

  • Capture data values for later use by a function

  • Call functions outside of their normal scope

  • Save the handle in a MAT-file to be used in a later MATLAB session

See Applications of Function Handles for an explanation of each of these applications.

Was this topic helpful?