parseargs - A very flexible inputs parser
Version 1.1.1 (4,72 ko) par
wfH
Very flexible inputs parser. Parsing name-value pairs with default property easily.
Useful when a function requires multiple options.
PARSEARGS Set name-value pair arguments with default property easily.
The basic usage is like other similar functions in FEX, e.g., parseargs (Malcolm Wood), parse_pv_pairs (John D'Errico).
My parseargs can handle flexible input arguments (e.g., name-value pairs, a struct followed by name-value pairs, two struct, ...).
Besides, it allows user to control the parsing behavior, such as
- ['-checkcase'] whether parameter names are case-sensitive or not,
- ['-partial'] whether parameter names can be partially matched or not,
- ['-fix'] whether unmatched parameters can be kept or not,
- ['-checkclass'] whether data type can be changed or not,
- ['-checksize'] whether data size can be changed or not,
- ['-verbose'] whether any warning is shown or not.
Citation pour cette source
wfH (2026). parseargs - A very flexible inputs parser (https://fr.mathworks.com/matlabcentral/fileexchange/73063-parseargs-a-very-flexible-inputs-parser), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R2018a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
En savoir plus sur String Parsing dans Help Center et MATLAB Answers
Tags
Remerciements
Inspiré par : parse_pv_pairs, parseargs: Simplifies input processing for functions with multiple options
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.1.1 | 1. add wrapper of built-in `inputParser`
|
||
| 1.1.0 | 1. add wrapper of built-in `inputParser`
|
||
| 1.0.2 | bug fix |
||
| 1.0.1 | typo |
||
| 1.0.0 |
