MATLAB Function Reference    
func2str

Constructs a function name string from a function handle

Syntax

Description

func2str(fhandle) constructs a string, s, that holds the name of the function to which the function handle, fhandle, belongs.

When you need to perform a string operation, such as compare or display, on a function handle, you can use func2str to construct a string bearing the function name.

The func2str command also operates on MATLAB data structures that hold more than one function handle, (for example, arrays). It returns the names of all function handles in the data structure. These names are contained in a cell array of strings.

Examples

To create a function name string from the function handle, @humps

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

See Also

function_handle, str2func, functions


 fullfile function