rms.m

compute root-mean-square (RMS) of values supplied as a vector, matrix, or list of discrete values
ダウンロード: 9.5K
更新 2009/5/8

ライセンスの表示

rms computes the root-mean-square (RMS) of values supplied as a vector, matrix, or list of discrete values (scalars). If the input is a matrix, rms returns a row vector containing the RMS of each column.

David Feldman proposed the following simpler function definition:

RMS = sqrt(mean([varargin{:}].^2))

With this definition, the function accepts ([1,2],[3,4]) as input, producing 2.7386 (this is the same result that one would get with input of (1,2,3,4). I'm not sure how the function should behave for input of ([1,2],[3,4]). Probably it should produce the vector [rms(1,3) rms(2,4)]. For the moment, however, my code simply produces an error message when the input is a list that contains one or more non-scalars.

引用

Phillip M. Feldman (2026). rms.m (https://jp.mathworks.com/matlabcentral/fileexchange/24039-rms-m), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R2008b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCreating and Concatenating Matrices についてさらに検索
タグ タグを追加
バージョン 公開済み リリース ノート
1.0.0.0