1function [M] = mtrace_backward_moment(T,A,ORDERS,NORM)
2% Computes
the backward moments of a marked trace.
4% - T:
the inter-arrival times
6% - ORDERS: vector with
the orders of
the moments to compute
7% - NORM: 0 to
return B_{i,c}: M_i = sum B_{i,c}
8% 1 (
default) to
return B_{i,c}: M_i = sum B_{i,c} * p_c
10% M_i
is the class independent moment of order i
11% B_{i,c}
is the class-c backward moment of order i
12% p_c
is the probability of arrivals of
class c
14% - MOMENTS:
the backward moments as a matrix B(c,i) = B_{i,c}
16% by
default, moments are normalized
25M = zeros(C,length(ORDERS));
27for j = 1:length(ORDERS)
30 M(c,j) = mean(T.^k .* (A==MARKS(c)));
32 M(c,j) = M(c,j) * length(T)/sum(A==MARKS(c));