Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when reading channel locations from Brainstorm file with empty SCS field #774

Closed
nguyen-td opened this issue May 22, 2024 · 1 comment

Comments

@nguyen-td
Copy link

Description

Similar to #761 but the current version throws the error Index exceeds the number of array elements. Index must not exceed 0. when the elocIn.SCS field is empty. I am trying to convert this Brainstorm chanlocs file into EEGLAB's chanlocs format.

Extending

if isfield(elocIn.SCS, chans{iChan})

by if isfield(elocIn.SCS, chans{iChan}) && ~isempty(elocIn.SCS.(chans{iChan})) will fix it.

Steps to Reproduce

  1. Download the Brainstorm chanlocs here
  2. Run readlocs('channel_BrainProducts_ActiCap_97.mat');

Versions

OS version macOS Sonoma 14.3
Matlab version R2024a
EEGLAB version dev
@arnodelorme
Copy link
Collaborator

Thanks. This has been fixed in cf60b0a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants