八度RMS功能无法识别

时间:2017-03-03 15:46:00

标签: octave

民间, 似乎rms功能尚未在octave的信号包中实现。

>> y = rms(x)^2
warning: the 'rms' function belongs to the signal package from Octave Forge but
has not yet been implemented.

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.

error: 'rms' undefined near line 1 column 5

知道我如何实现自己的自定义函数来计算rms值吗?

1 个答案:

答案 0 :(得分:2)

有一些patches on the patch tracker实现了rms:

剪断:

function y = rms (varargin)
  if (nargin != 1 && nargin != 2)
    print_usage ();
  endif
  y = sqrt (meansq (varargin{:}));
endfunction