In my work space i have a variable that i'd like to rename, with a name that is held as a char.
I want to do this in a simple m file which I can run whenever required.
I have some code that works
%where label name is my newname and DataCopy is my variable
str = [Label_name,'= DataCopy;'];
But I keep reading not to use the eval command, i don't know why and frankly i don't care. What i do know is it works ok from the command but crashes when run in my program.
I would just like to find a way of doing this simple repeated task.
I've tried a few other options but just seem to end up putting the string into the data and not renaming!