I wonder if there is another way to clear variables. If I do:
clear var1 var2
The variables are strings or purple and are not updated if the name of the variable is changed.
How can I realize that variables after a clear or clearvars are updated if the variable name is changed. (e.g. the original variable name was not descriptive enough).
Edit: I mean not during running the code, the variable name is not dynamic! I mean during writing, the editor offers you the possibility to rename all instances of a variable (Shift-Enter)
>> Press Shift+Enter to rename 4 instances of " var1" to " anothernameOfVar1"
within a script. Variables after a clear or clearvars are not affected by this.