Home > ISET > utility > checkfields.m

checkfields

PURPOSE ^

Check for the presence of a field, possibly nested, in a structure

SYNOPSIS ^

function bool = checkfields(s,varargin)

DESCRIPTION ^

 Check for the presence of a field, possibly nested, in a structure

  bool = checkfields(s,varargin)

 We often check for a field that is nested within other fields within a
 structure.   We have been doing this with a series of nested or grouped
 isfield statements. This got annoying, so I wrote this routine as a
 replacement. It extends the functionality of 'isfield'.

 Suppose there is a structure, pixel.OP.pd.type; You can verify that the
 sequence of nested structures is present via the call

      checkfields(pixel,'OP','pd','type')

 A return value of 1 means the field sequence is present, 
 A return value of 0 means the sequence is absent.

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 14-Jan-2007 10:24:23 by m2html © 2003