Is it possible to only read header information in an EDF file through edfread
23 views (last 30 days)
Show older comments
Hsin Yi Chen
on 21 Oct 2020
Commented: Hsin Yi Chen
on 21 Oct 2020
Hi all,
I have been using the edfread function (signal processing toolbox) in Matlab R2020b.
Is there a way to only read and extract the header information? I only need to know the start and end date/time of the file, so I don't need to read any of the records (which takes a long time)
I know how to extract the time information once the entire EDF file is read, but I want to NOT have to read the entire EDF file, just the header information, so it takes less time.
Thank you!
0 Comments
Accepted Answer
Walter Roberson
on 21 Oct 2020
edfinfo and look at the StartDate and StartTime properties to get the starting date/time
NumDataRecords tells you how many records are present for EDF+ files (watch out for -1 in the field for EDF files)
DataRecordDuration tells you how long each record takes. Multiply by one less than the number of data records, convert units as needed, add to the Start date/time to get the end date/time .
More Answers (0)
See Also
Categories
Find more on AI for Signals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!