Code covered by the BSD License  

Highlights from
signature

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 2.83 KB File ID: #28489

signature

by Peter Cotton

 

16 Aug 2010

Parse function argument names from an mfile or anonymous function handle

| Watch this File

File Information
Description

Returns a listing of function argument names
   
ARGSOUT = SIGNATURE.ARGOUT(FUN) returns a list of output arguments in the mfile corresponding to FUN

ARGSIN = SIGNATURE.ARGIN(FUN) returns a list of input arguments in the mfile corresponding to FUN

The latter also works for anonymous functions. For example:

signature.argin(@(x,y,z) z+y+x)
ans =
    'x' 'y' 'z'

MATLAB release MATLAB 7.10 (2010a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
mfile Peter Cotton 16 Aug 2010 10:49:09
nargout Peter Cotton 16 Aug 2010 10:49:10
nargin Peter Cotton 16 Aug 2010 10:49:10
arguments Peter Cotton 16 Aug 2010 10:49:10
varargout Peter Cotton 16 Aug 2010 10:49:10
varargin Peter Cotton 16 Aug 2010 10:49:10

Contact us at files@mathworks.com