0001 function [s] = putinfo_yp(s,struct_name,fexcept)
0002
0003
0004
0005
0006
0007
0008 if nargin < 3,
0009 fexcept = {'info','expert','values'};
0010 end
0011
0012 for ifield = 1:length(fexcept),
0013 if isfield(s,fexcept{ifield}),
0014 s = rmfield(s,fexcept{ifield});
0015 end
0016 end
0017
0018 fnames = fieldnames(s);
0019
0020 for ifield = 1:length(fnames),
0021 [s.info.(fnames{ifield}),s.expert.(fnames{ifield}),s.values.(fnames{ifield})] = structinfo_yp(struct_name,fnames{ifield});
0022 if isstruct(s.(fnames{ifield})),
0023 [s.(fnames{ifield})] = putinfo_yp(s.(fnames{ifield}),fnames{ifield},fexcept);
0024 end
0025 end
0026
0027