File Exchange

image thumbnail

Calculate Effective or RMS Values

version 1.0.0.0 (8.55 KB) by Jan Lubina
Calculates the RMS for discrete time vectors.

2 Downloads

Updated 31 Mar 2016

View License

Calculates effective values for time-discrete row-vectors X from local maxima to local maxima of [X(t+1) - X(t)] between first and last maxima:
1 T
Xeff = sqrt( - * int (X(t)^2) dt)
T 0

Noisy signals can be analysed according to the input parameters (estimated noise and min. period length)

Cite As

Jan Lubina (2021). Calculate Effective or RMS Values (https://www.mathworks.com/matlabcentral/fileexchange/8914-calculate-effective-or-rms-values), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

zaki Ahmed

It would be a bit faster to use an fir filter to do the averaging, try
X = X.*X; % get the squared version of the waveform
fav = ones(1,period); % to do the sum
Xeff = filter(fav,1,X); %get the sum
Xeff = Xeff/period; %this does the average
Xeff = sqrt(Xeff); % this is the rms

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!