About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 6 years ago
  • Total downloads: 86
  • Price: Free |
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Scott McKinney (5 other programs)
See full specifications

scripts default iconScreenshot Fast root-mean-square (RMS) power (Scripts) Publisher's description

FASTRMS Instantaneous root-mean-square (RMS) power via convolution.

FASTRMS Instantaneous root-mean-square (RMS) power via convolution.

FASTRMS(X), when X is a vector, is the time-varying RMS power of X, computed using a 5-point rectangular window centered at each point in the signal. The output is the same size as X and contains, for each point in X, an estimate of the instantaneous power expressed in the signal.

FASTRMS(X), when X is a matrix, is the time-varying RMS power of the columns of X.

FASTRMS(X,WINDOW), if WINDOW is a vector, computes the moving quadratic mean using the weights specified in WINDOW. If WINDOW is
%an integer, a LENGTH(WINDOW)-point rectangular window is used. When FASTRMS is being used to estimate the instantaneous amplitude of an oscillatory, zero-mean signal X (see below), WINDOW should be chosen based on the frequency content of X. Lower frequency signals require longer windows, whereas higher frequency signals allow shorter windows. As a rule of thumb, the window should be at least as long as one period of the signal.

FASTRMS(X,WINDOW,DIM), when X is a matrix, computes the RMS power along the dimension DIM. (DIM specifies the "time" axis for a matrix of
many trials.)

FASTRMS(X,WINDOW,DIM,AMP), if AMP is nonzero, applies a correction so that the output RMS reflects the equivalent amplitude of a sinusoidal input signal. That is, FASTRMS mutliplies the output by SQRT(2) to account for the fact that the integral of sin^2(t) over one period, t ~ [0,2*pi], equals (1/SQRT(2)).

The speed of FASTRMS is achieved by using convolution to compute the moving average of the squared signal. For this reason, FASTRMS also achieves maximal resolution, as the output is exactly the same size as X. However, the tradeoff is that some "edge effects" are incurred on the first and last approximately LENGTH(WINDOW)/2 samples. That is, since the convolution is computed using a zeropadded version of X, the RMS power will appear diminished near the beginning and end of the signal. Therefore, FASTRMS is best used on large input signals X.


Fs = 200; T = 5; N = T*Fs; t = linspace(0,T,N);
noise = randn(N,1);
[a,b] = butter(5, [9 12]/(Fs/2));
x = filtfilt(a,b,noise);
window = gausswin(0.25*Fs);
rms = fastrms(x,window,[],1);
plot(t,x,t,rms*[1 -1],'LineWidth',2);
xlabel('Time (sec)'); ylabel('Signal')
title('Instantaneous amplitude via RMS')

Created by Scott McKinney, January 2011

System Requirements:

MATLAB 7.8 (R2009a)
Program Release Status: Major Update
Program Install Support: Install and Uninstall

Screenshot Fast root-mean-square (RMS) power (Scripts) Tags:

Click on a tag to find related softwares

Is Screenshot Fast root-mean-square (RMS) power (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.