MATLAB Answers

How I can read chb01_03.edf.seizures file from CHB MIT database in MATLAB? As I am using this file for seizure detection required in my reasearch, Plz provide function to read this file.

29 views (last 30 days)
Varsha Harpale
Varsha Harpale on 29 Jun 2015
Edited: Walter Roberson on 20 Jun 2018
When I use edfread to read chb01_03.edf.seizures giving error!!!
Subscript indices must either be real positive integers or logicals.
Error in edfread1 (line 141)
hdr.label{ii} = regexprep(fread(fid,16,'*char')','\W','');
Error in Data_read_29_6_15_Seiz (line 3)
[a11,b11]=edfread1('chb01_03.edf.seizures');

  0 Comments

Sign in to comment.

Answers (3)

Walter Roberson
Walter Roberson on 29 Jun 2015
I do not see edfread1() anywhere. Have you tried edfread2() or readEDF()

  4 Comments

Show 1 older comment
Varsha Harpale
Varsha Harpale on 29 Jun 2015
Thank you Walter
But with edfread1() at least I can read chb01.edf but having problem in reading chb01.edf.seizures file.
Varsha Harpale
Varsha Harpale on 29 Jun 2015
With ReadEDF I can read normal chb01.edf but for chb01.edf.seizures having error!!!!!
[c1,b2]= ReadEDF('chb01_03.edf.seizures'); Index exceeds matrix dimensions.
Error in ReadEDF (line 17) header.patientID = char(hdr(9:88)); % 80 ascii : local patient identification
Walter Roberson
Walter Roberson on 9 Jan 2016
My guess would be that chb01.edf.seizures is not an edf file, and is instead a file that contains a list of edf files.

Sign in to comment.


Alex
Alex on 8 Jan 2016
Edited: Walter Roberson on 9 Jan 2016
I used this code that I got from comparing bytes in .edf.seizure files to the summary of the data in the folder:
function [ seizure_start_time_offset_in_seconds, seizure_length_in_seconds ] = get_seizure_period( annotation_file_location )
file_descriptor = fopen(annotation_file_location);
byte_array = fread(file_descriptor);
seizure_start_time_offset_in_seconds = bin2dec(strcat(dec2bin(byte_array(39)),dec2bin(byte_array(42))));
seizure_length_in_seconds = byte_array(50);
end

  5 Comments

Show 2 older comments
Naznin Sultana
Naznin Sultana on 13 Feb 2018
I have the similar problem. I can not read .seizure file from CBH_MIT database. What does this function
function [ seizure_start_time_offset_in_seconds, seizure_length_in_seconds ] = get_seizure_period( annotation_file_location )
do? How can i get seizure data and plot it?

Sign in to comment.


Tags

Products