make_bciprm.m - Why do we preserve parameter meta info?
Posted: 12 Sep 2012, 11:45
make_bciprm.m, lines 143-
What is the benefit to preserving previous occurrence's meta info? For example, when overwriting spatial filters, why would we want to preserve the older RowLabels and ColumnLabels?
Code: Select all
for i = 1:numel(fn)
if isfield(p, fn{i}) % if it already exists, preserve the meta-info from previous occurrences, and update the Value
s = p.(fn{i});
if isfield(s, 'NumericValue'), s = rmfield(s, 'NumericValue'); end
s.Value = arg.(fn{i}).Value;
else % otherwise use the whole new substructure
s = arg.(fn{i});
end
p.(fn{i}) = s;
end