area: @computeArea
Call a local function using its handle to compute the area of an ellipse.
h.area(3,1)
ans =
9.4248
Alternatively, you can use the localfunctions function to create a cell array of function
handles from all local functions automatically. This approach is convenient if you expect to
add, remove, or modify names of the local functions.
See Also
localfunctions
Related Examples
- “Create Function Handle” on page 13-2
More About
- “Local Functions” on page 20-30
See Also