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
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 LinuxCategories
Find more on Workspace Variables and MAT-Files in Help Center and MATLAB Answers
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.