Home > Objects > @iFunc > findfield.m

iFit/findfield

PURPOSE ^

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

SYNOPSIS ^

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

DESCRIPTION ^

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

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

   [match,type,n] = findfield(iFunc) returns the names of all iFunc fields
   [match,type,n] = findfield(iFunc, field) returns the names of all iFunc 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 (iFunc)
         field: field name to search, or '' (char).
         option: empty or 'exact' 'case' 'char' or 'numeric' (char)
 output: match:  names of iFunc fields (cellstr)
         types:  types of iFunc fields (cellstr), e.g. 'double', 'char', 'struct'...
         nelements: total number of elements in iFunc fields (double)
 ex:     findfield(iFunc) or findfield(iFunc,'Name') or findfield(s,'Name','exact case')

 Version: Aug. 22, 2017
 See also iFunc, iFunc/set, iFunc/get

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1