Home > atmlab > gformat > isgformat.m

isgformat

PURPOSE ^

ISGFORMAT Determines if the variable has mandatory gformat fields

SYNOPSIS ^

function b = isgformat( G )

DESCRIPTION ^

 ISGFORMAT   Determines if the variable has mandatory gformat fields

    The check considers only field names. The content of the fields is not
    considered.

    For a description of the gformat
       help gformat

 FORMAT   b = isgformat( G )
        
 OUT   b     True or false.
 IN    G     A gformat structure (array).

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

isgformat.m

SOURCE CODE ^

0001 % ISGFORMAT   Determines if the variable has mandatory gformat fields
0002 %
0003 %    The check considers only field names. The content of the fields is not
0004 %    considered.
0005 %
0006 %    For a description of the gformat
0007 %       help gformat
0008 %
0009 % FORMAT   b = isgformat( G )
0010 %
0011 % OUT   b     True or false.
0012 % IN    G     A gformat structure (array).
0013 
0014 % 2010-01-06   Created by Patrick Eriksson.
0015 
0016 function b = isgformat( G )
0017   
0018 b = false;
0019 
0020 if ~isstruct(G) ||  ~isfield(G,'DIM'), return, end
0021 
0022 Gt = gf_empty( max( G(:).DIM ) );
0023 
0024 if ~all( isfield( G, fieldnames(Gt) ) ), return, end
0025 
0026 b = true;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005