Borrar filtros
Borrar filtros

How to define line code to block Frequency EEG based on specific range?

2 visualizaciones (últimos 30 días)
I am new on mathalab and programmation, I am loocking for a base script to lock specific range of EEG frequency.
I would like :
to create a script able to detect the frequency from 0 to 20 Hz.
to block some of this frquency.
Thank you for help.
  2 comentarios
Manikanta Aditya
Manikanta Aditya el 19 de Mayo de 2024
Just as a starting point of help you can refer this:
% Assuming 'eegData' is your EEG data and 'Fs' is the sampling frequency
eegData = ...;
Fs = ...;
% Design a bandpass filter that passes frequencies between 0 and 20 Hz
d = designfilt('bandpassiir', 'FilterOrder', 20, ...
'HalfPowerFrequency1', 0, 'HalfPowerFrequency2', 20, ...
'SampleRate', Fs);
% Apply the filter to the EEG data
filteredEegData = filtfilt(d, eegData);
MOUSTADRANE
MOUSTADRANE el 19 de Mayo de 2024
Thank you very much, it s help full !

Iniciar sesión para comentar.

Respuesta aceptada

Manikanta Aditya
Manikanta Aditya el 20 de Mayo de 2024
Refer this code as a starting point:
% Assuming 'eegData' is your EEG data and 'Fs' is the sampling frequency
eegData = ...;
Fs = ...;
% Design a bandpass filter that passes frequencies between 0 and 20 Hz
d = designfilt('bandpassiir', 'FilterOrder', 20, ...
'HalfPowerFrequency1', 0, 'HalfPowerFrequency2', 20, ...
'SampleRate', Fs);
% Apply the filter to the EEG data
filteredEegData = filtfilt(d, eegData);
I hope this helps.

Más respuestas (0)

Categorías

Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by