putinfo_yp

PURPOSE ^

SYNOPSIS ^

function [s] = putinfo_yp(s,struct_name,fexcept)

DESCRIPTION ^

 This function paste up to date informations on each field of any structure used by C3PO/LUKE. Recursive in sub-structures
 It also set-up the expert mode for each field.

 by Y. Peysson (DRFC/DSM/CEA) <yves.peysson@cea.fr> and J. Decker (DRFC/DSM/CEA) <joan.decker@cea.fr>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [s] = putinfo_yp(s,struct_name,fexcept)
0002 %
0003 % This function paste up to date informations on each field of any structure used by C3PO/LUKE. Recursive in sub-structures
0004 % It also set-up the expert mode for each field.
0005 %
0006 % by Y. Peysson (DRFC/DSM/CEA) <yves.peysson@cea.fr> and J. Decker (DRFC/DSM/CEA) <joan.decker@cea.fr>
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

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.