function LoadParams(filename)
global params
input = load(filename);
guiParamsExist = any(strcmp(fieldnames(input), 'guiParams'));
if guiParamsExist
input = input.guiParams;
end
for panIdx_ = 1 : length(params)
for parIdx = 1 : length(params{panIdx_})
varname = params{panIdx_}{parIdx}.name;
handlers = params{panIdx_}{parIdx}.handlers;
h2 = handlers(2);
[oldValue, style, field] = GetUIControlValue(h2);
if strcmp(style, 'pushbutton')
continue
end
try
cmd = sprintf('value = input.%s;', varname);
eval(cmd);
catch
value = oldValue;
end
set(h2, field, value);
params{panIdx_}{parIdx}.value = value;
if strcmp(style, 'mledit')
end
end
end
end