Apply default values to current workspace

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 (2024). 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
Categories
Find more on Workspace Variables and MAT-Files in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.1.0.0

updated name
Forgot to include my own function in the example

1.0.0.0

small typo