Rename a variable & delete the old name. Essentially this is a shorter-keystroke version of "a=b;clear(b)" .
Be warned that this function messes with the calling environment, a programming practice frowned upon by many.
Carl Witthoft (2021). newname(oldname) (https://www.mathworks.com/matlabcentral/fileexchange/52332-newname-oldname), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!