func2str
Returns a string containing the name of the functionf.
Syntax
func2str(f)
Inputs
- f
- Type: Function handle.
Outputs
- R
- Resulting string.
Examples
f = @sum % Creates a function handle for the built-in function 'sum'
f = sum
R = func2str(f)
R = sum
f = @(x) 2*x % Creates a function handle for the user defined function, with input x
f = anonymous
R = func2str(f)
R = anonymous