FUNCTION REFERENCE
isfield
Test whether a struct has named fields.
Test whether a struct has named fields.
Syntax
isfield(S, name)Syntax
isfield(S, names)A character name gives a logical scalar. A cell array of names gives a logical array of the same shape. Names must match exactly. A non-struct input, or a cell entry that is not a character row, gives false.
Example
isfield(struct('a',1),{'a','z'}) % [true false]Differences from MATLAB: Logical display differs.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.