This function returns the info for the field fname of the structure s
0001 function finfo = getfieldinfo_jd(s,fname) 0002 % 0003 % This function returns the info for the field fname of the structure s 0004 % 0005 finfo = ''; 0006 % 0007 if ~isfield(s,fname), 0008 warning([fname,' is not a valid structure field.']) 0009 return 0010 end 0011 % 0012 if ~isfield(s,'info'), 0013 warning('The structure has no info field'); 0014 return 0015 end 0016 % 0017 if ~isfield(s.info,fname), 0018 warning(['There is no info for the field ',fname,'.']); 0019 return 0020 end 0021 % 0022 finfo = getfield(s.info,fname); 0023 % 0024 0025 0026 0027