Skip to content

struct_contains

miscellaneous · scripts/miscellaneous/struct_contains.m

Clean-room Octave-compat helper. MATLAB-valid % comments so the file parses under MATLAB-strict user addpath as well as under the shipped scripts tree.

: tf = struct_contains (s, f)

Return true when structure s contains field f.

f may be a character vector, string scalar, or cell array of field names (same shapes as isfield).