You can use function handles to invoke functions indirectly and parameterize operations that you repeat frequently. You can perform the following operations with function handles:
Define handles that reference user-defined functions and built-in functions supported for code generation (see Functions and Objects Supported for C and C++ Code Generation — Alphabetical List)
Note: You cannot define handles that reference extrinsic MATLAB® functions.
Define function handles as scalar values
Define structures that contain function handles
Pass function handles as arguments to other functions (excluding extrinsic functions)