指标计算中, 算不出来的情况下, 指标要给缺省值. 不可以填nan
缺省值如下:
classdef FeStatus<double
properties(Constant)
UNKNOW_REASON = -0.1111 % 未知原因, try catch捕捉
WAVE_TIMEOUT = -0.2222 % 读波形超时
WAVE_MISS = -0.3333 % 缺波形
ADRPM_TIMEOUT = -0.4444 % 读ADRPM超时
ADRPM_MISS = -0.5555 % 缺ADRPM
MISS_DUE_TO_RESAMPLE = -0.6666 % 因为对齐测点重采样缺指标
ERROR_SIGNAL = -0.7777 % 误信号
FE_CAL_BREAK = -0.8888 % 指标计算提前终止,为输入数据有, 但不符合规范提前停止.
STOP_EVENT = -0.9999 % 停机
OK = 0 % OK
BYPASS = 0 % 跳过未计算.
end
methods(Static)
function festatus=combine_errors(errors)
% input: errors. list of FeStatus
festatus=max(errors(errors~=0));
end
end
end