Nargin Complete
The NarginComplete function can be used to manage input arguments. Some functions need necessary input variables and optionnal variables, with automatic default values.
You can create this kind of function :
NarginExample(arg1,arg2,'arg4',arg4,'arg3',arg)
- arg1 & arg2 are necessary inputs.
- arg3 & arg4 are optionnal inputs. The order doesn't matter and you can associated default values to your input.
NarginComplete should be compatible with any kind of variables.
Cite As
Etienne Combrisson (2024). Nargin Complete (https://www.mathworks.com/matlabcentral/fileexchange/50654-nargin-complete), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.