MATLAB Function Reference |
Determine if input is MATLAB structure array field
Syntax
Description
tf = isfield(A, 'field')
returns logical 1
(true
) if field
is the name of a field in the structure array A
, and logical 0
(false
) otherwise. If A
is not a structure array, isfield
returns false
.
Examples
Given the following MATLAB structure,
patient.name = 'John Doe'; patient.billing = 127.00; patient.test = [79 75 73; 180 178 177.5; 220 210 205];
isfield
identifies billing
as a field of that structure.
See Also
fieldnames
, setfield
, getfield
, orderfields
, rmfield
, struct
, isstruct
, iscell
, isa
, is*, dynamic field names
isequalwithequalnans | isfinite |
© 1994-2005 The MathWorks, Inc.