fabien van mook

all packages "fvm-*"

package "fvm-miscellaneous"

function file "enum2struct.m"

Function r = enum2struct(c)
         r = enum2struct(c,istart,deltai);

returns a structure r, of which the fields have a key
given by each element of row cell array of strings c.
Each field is given a value, starting from istart (1
by default) and subsequent adding deltai (1 by default).

The function behaves in the same way as writing the
following code:
   r.(c{1,1}) = istart + 0*deltai;
   r.(c{1,2}) = istart + 1*deltai;
   r.(c{1,3}) = istart + 2*deltai;
   ...

(c) 2026 fabien van mook

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