Apply default values to current workspace

version 1.1.0.0 (2.11 KB) by Isaac Pedisich
Assigns default values to variables in workspace that are empty or undefined

38 Downloads

Updated 25 Jan 2016

View License

If a variable <default_foo> exists in a workspace, and the variable <foo> is undefined or empty, <foo> is assigned the value of <default_foo>
This function makes it easy to assign default values in other functions without the ~exists || isempty syntax.

Cite As

Isaac Pedisich (2022). Apply default values to current workspace (https://www.mathworks.com/matlabcentral/fileexchange/55072-apply-default-values-to-current-workspace), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!