1function MOMENTS=dmap_moment(DMAP,ORDERS)
2% MOMENTS=dmap_moment(DMAP,ORDERS) - Compute raw moments of
3% inter-arrival times
for a discrete-time MAP
6% DMAP: a D-MAP in
the form of {D0,D1}
7% ORDERS: set of moment orders (1=>E[X], 2=>E[X^2], 3=>E[X^3])
10% MOMENTS: moments returned in
the same order of ORDERS
12% NOTE:
the previous formula factorial(i)*al*(I-D0)^-i*e returned neither
the
13% raw nor
the falling-factorial moment
for order>=2 (e.g. it gave 4.447 where
14%
the true E[X^2]
is 2.958). The raw moments below match
the JAR
15% implementation and a brute-force sum over
P(X=k)=al*D0^(k-1)*D1*e.
35 MOMENTS(t)=2*al*A*Ae - m1;
37 MOMENTS(t)=6*al*A*A*Ae - 6*al*A*Ae + m1;
39 error(
'dmap_moment: raw moments of order > 3 not implemented');