Explanation

<MAIN FUNCTION> takes a function handle or an anonymous function as its first input argument.


Suggested Action

To pass a handle to a function as the argument, prepend an @ before the function call. See Pass Function to Another Function or the documentation for <MAIN FUNCTION> for usage examples.

If you see this error on a function that returns a function handle, add empty parentheses to the function call:

BeforeAfter
<Main Fcn>(<Arg Fcn>, ...) <Main Fcn>(<Arg Fcn>(), ...)