sccn / eeglab

EEGLAB is an open source signal processing environment for electrophysiological signals running on Matlab and developed at the SCCN/UCSD

Home Page:https://eeglab.ucsd.edu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pop_saveset asks for string, only accepts char arrays

Luke-Acuff opened this issue · comments

commented

Description

The pop_saveset function returns an error "error: argument 'filename' must be a string" despite the argument being a string. Looking into the source code, the 'finputcheck' EEGLAB function checks if the input is a string at line 213 by assessing tmpval with 'ischar; which checks for char arrays, not strings. If a char array is desired, the case and error message should return and ask for a char array, not a string. If a string truly is desired, 'isstring' should be used in place of 'ischar'.


#### Steps to Reproduce
  1. Load eeglab
  2. Load EEG data as EEG
  3. Run the following line of code
  4. pop_saveset(EEG, 'filename', "test");

#### Expected behavior: For pop_saveset to save EEG when the 'filename' argument is a string.
#### Actual behavior: pop_saveset throws "error: argument 'filename' must be a string"
#### Versions
OS version Windows 10 Enterprise
Matlab version 2023b
EEGLAB version 2024a

This is because "test" is different from 'test'
This has been fixed in c905011
Thank you for reporting the problem