| MATLAB Function Reference | ![]() |
Return information about a function handle
Syntax
f = functions(funhandle)
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 substructure identifying the classes and M-files that overload the function.
Note
The functions function is provided for querying and debugging purposes. Its behavior may change in subsequent releases, so it should not be relied upon for programming purposes.
|
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 substructure 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 | ![]() |