Skip to content

vlt.db.struct_name_value_search

  vlt.db.struct_name_value_search - search a struct with fields 'name' and 'value'

  [V,I] = STRUCT_NAME_VALUE_SEARCH(THESTRUCT, THENAME, [MAKEERROR])

  Searches a structure array THESTRUCT that is expected to have fields
  'name' and 'value'. If there is a name matching THENAME, then the
  value of the 'value' field for that entry is returned in V.
  I is the index of the entry of THESTRUCT that had the match. If 
  there was no match, I is empty.
  If there is more than one match, V will be the value of the first match.

  MAKEERROR is an optional argument (default value 1) that determines whether or
  not the function will generate an error if THENAME is not found.