Borrar filtros
Borrar filtros

Read GDF File from BCI Competition 2008 – Graz data set B

14 visualizaciones (últimos 30 días)
Çağatay Murat Yılmaz
Çağatay Murat Yılmaz el 10 de Oct. de 2018
Comentada: Prithwish el 19 de Ag. de 2023
Hello, I want to read data from BCI Competition 2008 – Graz data set B and use these data for feature extraction and classification. I wrote the following code to read and store different types of motor imageries in different variables. For example, A01T_C1 variaable stores all left imagery data. Am i doing right? Also, I want to ask that am i need to use EOG data before feature extraction. If so, what can I do to remove artefacts?
Thank you very much.
Data set description can be found here: http://www.bbci.de/competition/iv/desc_2a.pdf
filename = 'A04T.gdf';
[s, HDR] = sload('.\BCICIV_2a_gdf\A04T.gdf');
type=HDR.EVENT.TYP;
pos=HDR.EVENT.POS;
dur=HDR.EVENT.DUR;
iv_c1=1; iv_c2=1; iv_c3=1; iv_c4=1;
for i=1:size(type,1)
if type(i,1)==769
subdata=s(pos(i,1):pos(i,1)+dur(i,1),:);
A01T_C1(iv_c1,:,:)=subdata;
iv_c1=iv_c1+1;
elseif type(i,1)==770
subdata=s(pos(i,1):pos(i,1)+dur(i,1),:);
A01T_C2(iv_c2,:,:)=subdata;
iv_c2=iv_c2+1;
elseif type(i,1)==771
subdata=s(pos(i,1):pos(i,1)+dur(i,1),:);
A01T_C3(iv_c3,:,:)=subdata;
iv_c3=iv_c3+1;
elseif type(i,1)==772
subdata=s(pos(i,1):pos(i,1)+dur(i,1),:);
A01T_C4(iv_c4,:,:)=subdata;
iv_c4=iv_c4+1;
end
end
  2 comentarios
vinay kulkarni
vinay kulkarni el 20 de Jul. de 2020
Hello,
your code is working fine, Thank you.
But, I have little doubt,
A01T_C1(iv_c1,:,:)=subdata;
why not like
A01T_C1(:,:)=subdata;
Prithwish
Prithwish el 19 de Ag. de 2023
I can't call 'sload' function will return a error in filename at 645 line. If any one have solution please help me.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Biomedical Signal Processing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by