version (585 Bytes) by Carl Witthoft
One-liner function to rename an object


Updated Wed, 29 Jul 2015 18:42:41 +0000

View License

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.

Cite As

Carl Witthoft (2022). newname(oldname) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!