Hello Everyone,
I need RMS algorithm for video in Matlab. Has anyone it?

## Recommended Answers

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?

## All 3 Replies

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?

I have this algorithm but i don't know how can use for video

RMS looks like the following: 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
``````
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.