指标计算中, 算不出来的情况下, 指标要给缺省值. 不可以填nan

缺省值如下:

  1. classdef FeStatus<double
  2. properties(Constant)
  3. UNKNOW_REASON = -0.1111 % 未知原因, try catch捕捉
  4. WAVE_TIMEOUT = -0.2222 % 读波形超时
  5. WAVE_MISS = -0.3333 % 缺波形
  6. ADRPM_TIMEOUT = -0.4444 % ADRPM超时
  7. ADRPM_MISS = -0.5555 % ADRPM
  8. MISS_DUE_TO_RESAMPLE = -0.6666 % 因为对齐测点重采样缺指标
  9. ERROR_SIGNAL = -0.7777 % 误信号
  10. FE_CAL_BREAK = -0.8888 % 指标计算提前终止,为输入数据有, 但不符合规范提前停止.
  11. STOP_EVENT = -0.9999 % 停机
  12. OK = 0 % OK
  13. BYPASS = 0 % 跳过未计算.
  14. end
  15. methods(Static)
  16. function festatus=combine_errors(errors)
  17. % input: errors. list of FeStatus
  18. festatus=max(errors(errors~=0));
  19. end
  20. end
  21. end