MATLAB: Evaluate string as structure

evalMATLABstruct

I wish to load a structure based on a string input and copy the contents to a new structure. I can do this with eval, but would prefer not to.
For example:
user_string = 'structure_name';
load( user_string )
new_data = eval( user_string );
The structure 'structure_name' has several fields and is saved as a .mat file.
Using (user_string) to evaluate the structure isn't an option

Best Answer

The most important thing is to always load into an output variable, then your task is easy:
N = 'structure_name';
S = load(N); % load into an output variable (a scalar structure)
new_data = S.(N);
Or, if there is exactly one variable in the .mat file:
C = struct2cell(S);
new_data = C{1};