isfield
- :
tf =isfield(x, "name")¶ - :
tf =isfield(x, name)¶ Return true when x is a structure that contains a field called name.
If x is not a structure the result is simply false. When name is instead a cell array of strings, each name is checked and a logical array of the same shape is returned, with true in each position whose name is a field of x; a cell entry that is not a string reports false there. Two arguments are required.