| MATLAB Function Reference | ![]() |
Return information about a function handle
Syntax
f = functions(funhandle) f = functions(@fun)
Description
f = functions(funhandle)
returns, in a MATLAB structure, the function name, type, and filename for the function handle stored in the variable, funhandle. For overloaded functions, it also returns a separate structure identifying the classes and M-files that overload the function.
f = functions(@fun)
returns the same information for the function, fun.
Examples
To obtain information on a function handle for the display function,
f = functions(@deblank)
f =
function: 'deblank'
type: 'overloaded'
file: 'matlabroot\toolbox\matlab\strfun\deblank.m'
methods: [1x1 struct]
The methods field is a separate structure containing one fieldname for each class that overloads the function. The value of each field is the path and name of the file that defines the method.
f = functions(@display);
f.methods
ans =
polynom: '\home\user4\@polynom\display.m'
inline: 'matlabroot\toolbox\matlab\funfun\@inline\display.m'
serial: 'matlabroot\toolbox\matlab\iofun\@serial\display.m'
avifile: 'matlabroot\toolbox\matlab\iofun\@avifile\display.m'
See Also
| function_handle (@) | funm | ![]() |