pop_saveset asks for string, only accepts char arrays
Luke-Acuff opened this issue · comments
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
- Load eeglab
- Load EEG data as EEG
- Run the following line of code
- 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