MATLAB: Use strings to give commands

string

Hi everyone,
I have many variables with different names and they all content a struct "Value". Now a program loads one of those variables in my workspace, only knowing by a string which one it is.
For example: str='xxx'; load('blabla.mat', str);
Now I want to get access to xxx.Value and I want to ask you, how I can get that command when I only have 'xxx' as a string?
As I told you, the program must being kept general, because xxx can stand for any of many variables.
Best regards and thank you! Oli

Best Answer

how about replacing
load('blabla.mat', str);
with
data = load('blabla.mat', str);
Then the variable can be accessed with
data.(str)