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:
Xeff = sqrt( - * int (X(t)^2) dt)
Noisy signals can be analysed according to the input parameters (estimated noise and min. period length)
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 .
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
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!