How to define line code to block Frequency EEG based on specific range?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
MOUSTADRANE
am 19 Mai 2024
Beantwortet: Manikanta Aditya
am 20 Mai 2024
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 Kommentare
Manikanta Aditya
am 19 Mai 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);
Akzeptierte Antwort
Manikanta Aditya
am 20 Mai 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.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu EEG/MEG/ECoG finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!