1function newmodel = removeClass(model,
jobclass)
2% NEWMODEL = REMOVECLASS(MODEL, JOBCLASS)
4% Non-mutating variant of Network.removeClass:
return a copy of MODEL in
5% which JOBCLASS has been removed, leaving MODEL itself untouched. Use
this
6% when the original model must stay solvable (e.g. ablation studies, or a
7% per-chain decomposition that peels one
class at a time).
9% The removal logic lives in @MNetwork/removeClass.m and
is delegated to
10% here rather than duplicated, so that the two entry points cannot drift.
11% The lookup on the copy
is by
class name (see @MNetwork/removeClass.m), so
12% passing the JOBCLASS
object of the original model
is correct.
14% Copyright (c) 2012-2026, Imperial College London
17newmodel = model.copy();