MATLAB: Predefined “Settings” in R2011b

class

Dear Forum,
in R2010b I used a larger struct named "Settings", used to collect several settings. I saved this struct to a mat-file and tried to reload it later on. When accessing the (loaded) Settings, Matlab R2011b gives:
ans=
Settings handle with no properties.
Methods, Events, Superclasses
It seems, that in R2011b a new class named Settings came onto the field.
My question:
Is this problematic? How to override? Should I override? What would be the best choice to do?
Thanks for any answer,
Alexander

Best Answer

Where and how are you trying to reload them?
In 11b I get the following:
>> which Settings -all
Settings is a built-in method % Settings constructor
>> Settings = pi
Settings =
3.1416
>> which Settings -all
Settings is a variable.
Settings is a built-in method % Shadowed Settings constructor
So you're right that there is a name conflict, but a local variable should (as always) take precedence. So I'm wondering if this is a problem with zapping variables into existence inside a function.
If you have load foo in a function (and Settings is a variable in foo.mat) then you will run into name conflict problems. The solution is to use the functional form of load:
x = load('foo.mat');
Settings = x.Settings;
clear('x');