[FieldTrip] RMS calculation

Casper Kerren CXK699 at student.bham.ac.uk
Wed Jun 28 20:36:38 CEST 2017


Hi Mona,

I guess you want to measure the fluctuation in the data.
If for example you have your data in a channel-time-trial structure, you can get the RMS over electrodes by using the following:
AvgChan = squeeze(sqrt(mean(data.^2, 1)));   (Just change the dimension you want to calculate it over).
You will then get a measure per time-trial point.
If you check that against the rms(data,1) you see that you get the same answer.

I don’t know about a rms function in fieldtrip, but detrended fluctuation analysis involves RMS, so maybe you can start looking there.

I hope this helped you a bit.

Kind regards,

Casper

From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wong-Barnum, Mona
Sent: 28 June 2017 18:05
To: FieldTrip discussion list
Subject: [FieldTrip] RMS calculation


Hello fellow FieldTrip users:

We would like to do RMS calculations for our MEG & EEG data.  My PI explains the calculation we need as follows:

This is a very simple calculation. What it does is it takes an amplitude, meaning a sine wave like signal, that goes above and below the midline, and thus also has negative and positive values and converts them all to positive values and then exhibits what is called “power.” All of the original values are squared and that leaves us with power which is essentially the “energy” of the signal. And of course instead of 603.1072 measures per second, we end up with only one measure per second to help simply the overall signal.

I don’t see a RMS calculation in the FieldTrip software but there appears to be a Matlab rms function (http://www.mathworks.com/help/signal/ref/rms.html).

I’m hoping someone more knowledgeable than I can either point to an appropriate function in the FieldTrip software or confirm that the Matlab rms function will do what we are looking for?

Mona

*********************************************
    Mona Wong
    Web & Mobile Application Developer
    San Diego Supercomputer Center

    "Whether you think you can or you
    you can't, you're right."
                                --- Henry Ford
*********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170628/51548050/attachment-0002.html>


More information about the fieldtrip mailing list