fabien van mook

all packages "fvm-*"

package "fvm-miscellaneous"

function file "kvpairs2keystruct.m"

Function r = kvpairs2keystruct(c)
         r = kvpairs2keystruct(c,d)

returns a struct in which each field holds a key and its
index to the given row cell-array c with a series of
key-value pairs, c. Each key must be a character row
vector (or string).

Input argument d indicates which index is stored in r,
when there are multiple instances of the same key:
  'first': only the first instance is stored;
  'last': only the last instance is stored;
  otherwise: all instances are stored.


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-miscellaneous" under GNU GPLv3+