2017-03-03 92 views
0

民謠, 似乎rms功能還沒有在八度的信號包中實現。沒有識別八度RMS功能

>> 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 

任何想法如何實現我自己的自定義函數來計算有效值?

回答

2

有一些patches on the patch tracker它實現RMS:

剪斷:

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