inputname
Variable name of a function argument from the caller’s perspective.
Syntax
Section titled “Syntax”sname = inputname(argindex)Description
Section titled “Description”Inside a function body, returns the name of the variable that was passed as argument argindex. Returns an empty string if the argument was a literal expression rather than a named variable.
Example
Section titled “Example”function showname(x); fprintf('arg name: %s\n', inputname(1)); end