Skip to content
Snippets Groups Projects
isfield.m 620 B
Newer Older
function bool = isfield( self, fieldname )

% tsg_nc/get_fieldnames -- get internal structure fieldnames of "tsg_nc" object.
%
% Input
% -----
% self      ........... an instance of 'tsg_nc' object
% fieldname ........... is field of internal structure ?
%
% Output
% ------
% bool       .......... true if fieldname is internal structure 


% get cell of keys inside object
% ------------------------------
c = get(self);
if isempty(c)
  warning('Empty object') ;
else
 % get structure for the first element
 theStruc = get(self,c{1});
 bool = isfield(theStruc, fieldname);
end