Home > Objects > @iData > findfield.m

iFit/findfield

PURPOSE ^

[match, types, nelements]=findfield(iData, field, option) : look for iData fields

SYNOPSIS ^

function [match, types, dims] = findfield(s, field, option)

DESCRIPTION ^

 [match, types, nelements]=findfield(iData, field, option) : look for iData fields

   @iData/findfield function to look for iData fields, type and number of elements

   [match,type,n] = findfield(iData) returns the names of all iData fields
   [match,type,n] = findfield(iData, field) returns the names of all iData fields 
     that match 'field'
   The optional 'option' argument can contain one or more keywords:
     The 'exact'   option will search for the exact occurences.
     The 'case'    option specifies a case sensitive search. 
     The 'numeric' option will return only numerical fields.
     The 'char'    option will return only character fields.
     The 'cache'   option allows to re-use a previous field search cache for  
                     faster consecutive searches on the same object.
     The 'first'   option returns the first match (with shortest name/link).
     The 'biggest' option returns the biggest match (has max nb of elements).

   The cache mechanism allows to do iterative searches on the same object, e.g.
     findfield(s,'Title') and then findfield(s,'Signal','cache numeric')

 input:  s: object or array (iData)
         field: field name to search, or '' (char).
         option: empty or 'exact' 'case' 'char' or 'numeric' (char)
 output: match:  names of iData fields (cellstr)
         types:  types of iData fields (cellstr), e.g. 'double', 'char', 'struct'...
         nelements: total number of elements in iData fields (double)
 ex:     findfield(iData) or findfield(iData,'Title') or findfield(s,'Title','exact case')

 Version: Mar. 22, 2017
 See also iData, iData/set, iData/get, iData/findobj, iData/findstr

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 22-Mar-2017 09:13:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1