Say that I have a .mat file that contains a variable, and I need to load this variable and give it a different name. Is there any other (/better) way to do this than:
load(myFile, myVar)eval(['myNewname = ' myVar '; clear ' myVar])
?
loadnamespacevariable names
load(myFile, myVar)eval(['myNewname = ' myVar '; clear ' myVar])
Best Answer