File Exchange

image thumbnail

ArgUtils

version 1.5 (313 KB) by

Argument parsing utilities

0 Downloads

Updated

Useful for assigning defaults to functions that use varargin or structs of input parameters (alternative to inputParser).

See examples (and latest updates) on the github repository:
https://github.com/nvictus/ArgUtils

- Use ArgUtils.assignVars() to assign variables sequentially
- Use ArgUtils.assignArgs() to assign named variables: it works on either struct input or cell-array input containing a sequence of values followed by keyword arguments (name-value pairs) in any order.

Keywords are matched using MATLAB's string validator, so matching is case-insensitive and abbreviated keywords are acceptable as long as they can be matched unambiguously. There are also options to specify:
- required input parameters
- prefixes on keywords to prevent name collisions with string values

Comments and Ratings (2)

Updates

1.5

Connected to github

1.4

name on license

1.2

version 1.1 - fixed minor bug with prefixes, moved nonpublic functions to private folder

1.1

version 1.0 - stable

MATLAB Release
MATLAB 8.0 (R2012b)
Acknowledgements

Inspired: parseParameters

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video