You cannot pass function handles as inputs to or outputs from
entry-point functions. For example, consider this function:
function x = plotFcn(fhandle, data)
assert(isa(fhandle,'function_handle') && isa(data,'double'));
plot(data, fhandle(data));
x = fhandle(data);
In this example, the function plotFcn
receives
a function handle and its data as inputs. plotFcn
attempts
to call the function referenced by the fhandle
with
the input data
and plot the results. However, this
code generates a compilation error. The error indicates that the function isa
does
not recognize 'function_handle'
as a class name
when called inside a MATLAB function to specify properties of
inputs.