Suppose I have access to a structure created using a function load:
structWithVariables = load('data.mat');
I want to load all the variables from this structure into the workspace, but I cannot find a way to do this without hard-coding the names of all the variables.
Note. I do not have access to the .mat file, as well as to the code that loads the structure, I really only have the structure.
Note 2: the reason I want to do this is to simply use code that refers to the variables as if they were in the workspace. I do not want to change the code.
source
share