Dear all,
I have eeg files in edf format with different sampling frequencies.
For the EEG.srate = 200 ones, the Automagic runs without a hitch.
However, for the EEG.srate = 1000 ones, although runICA goes smoothly, but the ICLabel give the following error:
(eeg_rpsd.m, line 35, index in position 2 is invalid)
I found that in the eeg_rpsd.m file, when EEG.srate is 1kHz, the n_points variable becomes 1E3, which is treated as a float rather than an integer, causing the subsequent indexing to fail.
A solution is proposed: add line 17 as shown in the next picture (n_points = round(n_points)
After that, IClabel runs as intended, but I am curious if this solution breaks anything.
Dear all, I have eeg files in edf format with different sampling frequencies. For the EEG.srate = 200 ones, the Automagic runs without a hitch. However, for the EEG.srate = 1000 ones, although runICA goes smoothly, but the ICLabel give the following error: (eeg_rpsd.m, line 35, index in position 2 is invalid)
I found that in the eeg_rpsd.m file, when EEG.srate is 1kHz, the n_points variable becomes 1E3, which is treated as a float rather than an integer, causing the subsequent indexing to fail. A solution is proposed: add line 17 as shown in the next picture (n_points = round(n_points)
After that, IClabel runs as intended, but I am curious if this solution breaks anything.
Sincerely yours, Edward Cheng.