MATLAB Function Reference Previous page   Next Page
inputname

Return variable name of function input

Syntax

Description

This command can be used only inside the body of a function.

inputname(argnum) returns the workspace variable name corresponding to the argument number argnum. If the input argument has no name (for example, if it is an expression instead of a variable), the inputname command returns the empty string ('').

Examples

Suppose the function myfun.m is defined as

Then

produces

But

produces

See Also

nargin, nargout, nargchk


Previous page  inputdlg inspect Next page

© 1994-2005 The MathWorks, Inc.