Default arguments

Version 1.6.0.0 (1.24 KB) by Bas-Jan
Set default values for optional function input.
244 Downloads
Updated 26 Apr 2013

View License

Set default arguments for use in function, without having to code the switch-case blocks. Code is quite trivial, but it saves me some time coding.

Cite As

Bas-Jan (2026). Default arguments (https://www.mathworks.com/matlabcentral/fileexchange/41497-default-arguments), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.6.0.0

Optimized code

1.4.0.0

optimized code

1.0.0.0