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'
R = func2str(f)
f = @sum

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

R = 2 * x