[Eeglablist] Xdf importer error
Michael Glassen
mglassen at shp.rutgers.edu
Mon Sep 15 13:05:15 PDT 2025
Hi all,
I’m running into a problem with some xdf files I’m recording with lab recorder. I am using eeglab in matlab to load them. I have 1 or 2 event streams coming in and 1 eeg data stream. Some of the files load properly, while others are giving this error at
line 542: Array indices must be positive integers or logical values
It’s looking for a min at this line and using it to index into remaining_indices, but the index in this case is coming to zero.
I think it’s happening because ranges has 2 cells, and the first is only [1 1], the 2nd is [2 185]. So on line 532 cur_end_time==0, this means I have a data segment of length 0 I think? Could this be caused by one of my event streams having no events present?
I have a few datasets that are presenting this error, so any help is greatly appreciated! If you would like one of the files I can send one.
Just some more info, I checked the temp variable in load_xdf on one of the erroring datasets, and temp(1) is a trigger stream with no time series/time_stamps, could this be the issue?
Best,
Michael Glassen
More information about the eeglablist
mailing list