==> I just realized that the last line should be var_names(a+1,:) because Matlab indices begin with 1, but that is not the problem.
err msg is:
Warning: Out of range or non-integer values truncated during conversion to
character.
> In read_hdf at 20
? Subscripted assignment...