how to extract Mean, variance, standard deviation, frequency, maximum amplitude, minimum amplitude and energy from an EEG signal ???

please i need to konw how to extract Mean, variance, standard deviation, frequency, maximum amplitude, minimum amplitude and energy from an EEG signal

2 Comments

Why not start with the getting started tutorials in MATLAB? There you will learn about tools like mean, var, std, min, max, which do some of the things you want to know how to do.
actually i know this function but i don't know how to use the code with an EEG signal

Sign in to comment.

 Accepted Answer

8 Comments

the signal that i work in is [ val has 23 rows (signals) and 2560 columns (samples/signal) Duration: 0:10 Sampling frequency: 256 Hz Sampling interval: 0.00390625 sec ] and in the documentation of matlab i find Standard Deviation of Matrix Columns and as you can see i have 2560 columns that's why i don't know how to do it
In the functions I mentioned, there is a ‘dim’ or dimension argument. You need to specify that you want dimension 2, or rows, rather than the default dimension 1, or columns.
So since you are not using a weighting vector for standard deviation, you would use it as:
EEG_std = std(EEG_data, [], 2);
EEG_mean - mean(EEG_data,2);
and so for the others.
It works with the other function but when I try mean i got this error message" Attempt to execute SCRIPT mean as a function: C:\Program Files\MATLAB\R2016a\mean.m" the code that i wrote is:
clc;
clear all;
close all;
load('C:\Users\del.dell-PC\pfe\base de donnée\patient sans crise\chb01_01_edfm.mat')
deriv=(val(1,:)-0)/2.559375;
Fs=256;
t1=(0:length(deriv)-1)/Fs;
M = mean(deriv,2);
i dont understand what's the problem.
You have written a script and saved it as ‘mean.m’. This is called ‘overshadowing’ of a MATLAB function. Do not do it!
The solution is to rename your script file to something other than ‘mean.m’.
To find it, run this line from your Command Window:
filepath = which('mean.m', '-all')
The one that is not in a /toolbox/ path is the one you have to rename.
You can use the movefile function to rename it.

Sign in to comment.

More Answers (1)

please i need to know the method of calculating the mean, maximum, minimum and variance of an EEG signal after decomposition into 5 level wavelets and to calculate these parameters at these 5 details as well as the energy entropy .

Categories

Asked:

on 14 Mar 2017

Answered:

on 10 May 2021

Community Treasure Hunt

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

Start Hunting!