1function
bool = isCatastropheSignal(sn,
class)
2% BOOL = ISCATASTROPHESIGNAL(SN, CLASS)
4% True
if signal
class CLASS empties a station on arrival. The signaltype
is
5% consulted alongside
the iscatastrophe flag so that
the two encodings of a
6% catastrophe cannot disagree (SolverMAM applies
the same test).
9if isfield(sn,
'iscatastrophe') && ~isempty(sn.iscatastrophe) && numel(sn.iscatastrophe) >=
class ...
10 && sn.iscatastrophe(
class)
14if isfield(sn,
'signaltype') && ~isempty(sn.signaltype) && numel(sn.signaltype) >=
class
15 st = sn.signaltype{
class};
16 if ~isempty(st) && ~(isnumeric(st) && any(isnan(st))) && st == SignalType.CATASTROPHE