LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
maph2m_fit_mmap.m
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.
4%
5% Input
6% - mmap: MMAP to fit (of arbitrary order)
7% Output
8% - MAPH: fitted second-order MAPH[m]
9
10M1 = map_moment(mmap,1);
11M2 = map_moment(mmap,2);
12M3 = map_moment(mmap,3);
13
14P = mmap_pc(mmap);
15B = mmap_backward_moment(mmap,1);
16
17MAPH = maph2m_fit(M1, M2, M3, P, B);
18
19end