func2str

Returns a string containing the name of the functionf.

Syntax

func2str(f)

Inputs

f
Type: Function handle.

Outputs

R
Resulting string.
Type: string

Examples

Built-in function input:
f = @sum % Creates a function handle for the built-in function 'sum'
f = sum
R = func2str(f)
R = sum
User defined function input:
f = @(x) 2*x % Creates a function handle for the user defined function, with input x
f = anonymous
R = func2str(f)
R = anonymous