2
Contributors
3
Replies
12
Views
3 Years
Discussion Span
Last Post by phorce
0

RMS is not difficult. I don't code in Matlab anymore but can give you the algorithm and then you can code it. Or just find one online?

0

RMS looks like the following:

142f723c1bd32e409a170fd4ab91b79d

Let's take a simple signal:

X = [0, 1, 2, 3, 4, 5]

Then it would be the following:

rms(x) = sqrt(0^2 + ....../n)

Where n is the number of samples.

In other words, take the squared mean of the dataset, from this, find the square root. Simples

You haven't given a clear indication to what exactly you want to use with RMS for but I can make the assumtion that you need to carry out some kind of thresholding, if this is the case then:

1) Split your signal into segments
2) Calculate the RMS for each of these segments.

Here is the code written in MATLAB

function rms = quadraticMean(list)    
    rms = sqrt(mean(list.^2));
end

Edited by phorce

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.