1function f = cdclassfactor(beta, nirmat, rows,
class)
2% F = CDCLASSFACTOR(BETA, NIRMAT, ROWS, CLASS)
4% Per-row
class-dependence
factor for event rates. BETA
is a
class-dependence
5% handle mapping a 1xR per-
class population vector n to
the 1xR vector of
6% dimensionless rate scalings beta_r(n) (see fes_beta_handle). NIRMAT
is the
7% per-state per-
class population matrix (nstates x R, one row per enabled
8% state). ROWS selects
the enabled rows (logical mask or index vector over
the
9% rows of NIRMAT) and CLASS
is the class completing service.
11% For each selected row j
the handle
is evaluated on that row
's population
12% vector and the component of the completing class is returned:
13% F(j) = v(min(CLASS, numel(v))), v = BETA(NIRMAT(ROWS(j),:))
14% so a neutral scaling @(n) 1 (scalar) yields F(j) = 1 for every class.
16% Copyright (c) 2012-2026, Imperial College London
23f = ones(numel(rows),1);
25 v = beta(nirmat(rows(j),:));
26 f(j) = v(min(class, numel(v)));