1function MAPH = maph2m_fit_mmap(mmap)
2% Fits an
MMAP[m] with a second-order MAPH[m] that matches the
class
3% probabilities (always fitted exactly) and the backward moments.
6% - mmap:
MMAP to fit (of arbitrary order)
8% - MAPH: fitted second-order MAPH[m]
10M1 = map_moment(mmap,1);
11M2 = map_moment(mmap,2);
12M3 = map_moment(mmap,3);
15B = mmap_backward_moment(mmap,1);
17MAPH = maph2m_fit(M1, M2, M3,
P, B);