LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
maph2m_fitc_theoretical.m
1function [fit] = maph2m_fitc_theoretical(mmap, method)
2% Fits the theoretical characteristics of a MMAP(n,m) with a M3PP(2,m).
3% INPUT:
4% - mmap: the MMAP(n,m) to fit with a M3PP(2,m)
5% - method: either 'exact' or 'approx'
6
7if nargin == 1
8 method = 'exact';
9end
10
11m = size(mmap,2)-2;
12
13t1 = 1;
14t2 = 10;
15tinf = 1e4;
16t3 = 10;
17
18% joint-process charactersitics
19a = map_count_mean(mmap,t1)/t1;
20bt1 = map_count_var(mmap,t1)/(a*t1);
21binf = map_count_var(mmap,tinf)/(a*tinf);
22
23% per-class rates
24ai = mmap_count_mean(mmap,1);
25
26% per-class variance differential
27dvt3 = zeros(m,1);
28for i = 1:m
29 mmap2 = {mmap{1},mmap{2},mmap{2+i},mmap{2}-mmap{2+i}};
30 Vt3 = mmap_count_var(mmap2,t3);
31 dvt3(i) = Vt3(1)-Vt3(2);
32end
33
34if strcmp(method,'exact') == 1
35 fit = maph2m_fitc(a, bt1, binf, t1, ai, dvt3, t3);
36elseif strcmp(method,'approx') == 1
37 fit = maph2m_fitc_approx(a, bt1, binf, t1, ai, dvt3, t3);
38else
39 error('Invalid method ''%s\''', method);
40end
41
42end