Importing EEG edf to matlab

45 views (last 30 days)
Mubeen Janmohamed
Mubeen Janmohamed on 31 Dec 2020
Answered: Daniel Gallagher on 2 Jun 2021
Hi guys having this error message when importing EEG/EDF format into matlab. What can I do. Complete newbie.
Image Analyst
Image Analyst on 31 Dec 2020
That is, attach the data you forgot to attach, after reading the link above.
And did you download and install the mex file from that web site like it said to?
What is pop_biosig()? Is it a custom function you or someone else wrote? Attach your code if you want someone to try to run it.
Daniel Gallagher
Daniel Gallagher on 6 May 2021
Hi Mubeen,
I'm struggling with the same problem now. Did you ever find a solution?
I checked the link given by Athul, I've tried installing mexSLOAD.mex, and I've pored over all the documentation I can, but I haven't been able to crack it. Moreover, this error arises from only one EEG dataset (that was taken in exactly the same way as all my other datasets), which strikes me as quite odd. Anyway, I'd really appreciate it if you could tell me what ended up working for you!

Sign in to comment.

Answers (2)

Athul Prakash
Athul Prakash on 5 Jan 2021
Hi Mubeen,
I presume you're using the pro_biosig.m file found here:
The issue seems specific to the code the owner of the repo has written ("index exceeds the number of array elements"). However, the error message itself warns you about an installation and the issue could likely be from a missing file, so you should install mesSLOAD.mex as suggested.
You may find more help in the issues section of the repo you're using.
Hope it helps!

Daniel Gallagher
Daniel Gallagher on 2 Jun 2021
I had the same problem. In my case, the error only came up with one of my EEG datasets (which was recorded the same way as all the others). This eventually fixed it for me:
From the EEGLAB GUI, File > Manage EEGLAB Extensions > Biosig 7.3.5, then click "Install/Update".
I had previously tried updating source files (like edfannot2evt.m) manually, but I think doing so caused some problem with path (even though I tried manually updating that as well...). In any case, this manual updating didn't do the trick for me. But going through the GUI did, so maybe this will work for some others who face the same problem.


Find more on EEG/MEG/ECoG 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!