MATLAB Function Reference    

Constructs a function handle from a function name string



str2func('str') constructs a function handle, fhandle, for the function named in the string, 'str'.

You can create a function handle using either the @function syntax or the str2func command. You can also perform this operation on a cell array of strings. In this case, an array of function handles is returned.


To create a function handle from the function name, 'humps'

To create an array of function handles from a cell array of function names

See Also

function_handle, func2str, functions

  str2double str2mat