1function
MMAP = map_mark(MAP, prob)
2% MAP_MARK. Marks arrivals from a MAP according to give probabilities.
3%
MMAP = MAP_MARK(MAP, PROB) takes a MAP with a single arrival type and
4% returns a
MMAP with same unmarked inter-arrival process but marked
5% arrivals specified by PROB. PROB(k)
is the probability that the arrival
6% will be marked with type k.
8if (sum(prob) < 1 - 1e-6) || (sum(prob) > 1 + 1e-6)
9 warning(
'Input marking probabilities do not sum to 1. Normalizing.');
10 prob = prob / sum(prob);
15 MMAP{2+k} = prob(k) * MAP{2};