1function MC = mmap_cross_moment(mmap, k)
2% Computes the k-th order moment of the inter-arrival time between an
event
3% of
class i and an event of class j, for all possible pairs of
classes.
6% k: order of the moment
8% MC: the element in (i,j)
is the k-th order moment of the inter-arrival
9% time between an
event of
class i and an event of class j
24 TG(i) = simplify(sum(map_pie(mmap) * (-mmap{1}\mmap{2+i})));
26 TG(i) = sum(map_pie(mmap) * (-mmap{1}\mmap{2+i}));
31 start = map_pie(mmap) * (-mmap{1}\mmap{2+i}) / TG(i);
33 MC(i,j) = factorial(k) * sum(start * (inv(-mmap{1}))^(k+1) * mmap{2+j});
34 MC(i,j) = MC(i,j) / sum(start * (-mmap{1}\mmap{2+j}));