rms.m

버전 1.0.0.0 (1.61 KB) 작성자: Phillip M. Feldman
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 (2024). rms.m (https://www.mathworks.com/matlabcentral/fileexchange/24039-rms-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0