Menu

EP Toolkit fails to read EEGLAB .set with MustBeTextOrPatternScalar

Help
Wendy
2026-01-15
2026-01-16
  • Wendy

    Wendy - 2026-01-15

    Hi, I’m trying to import EEGLAB ERP datasets (dataset in .set and .fdt format for each participant, preprocessed already) into EP Toolkit but I consistently get this error:

    No data were read. The error message was:MATLAB:string:MustBeTextOrPatternScalar
    Search term must be a text or pattern scalar.
    EEGlab allows you to manually change the name of the .set file but not the .fdt file that goes with it. Is that what happened here?

    Is this a compatibility issue and how to solve it? Thank you so much!

     

    Last edit: Wendy 2026-01-15
  • Wendy

    Wendy - 2026-01-15

    My goal is to run PCA on the processed dataset. I can also generate a .mat file that includes the grand average. I was wondering how the .mat file should be formatted (e.g., data dimensions and structure) so that the toolbox can read it correctly and run PCA functions. Thank you!

     
  • Joe Dien

    Joe Dien - 2026-01-16

    That's a new one on me! Send me an example of your data files and I'll figure out what is going on. See the tutorial section on bug reports for the information I need to troubleshoot. Definitely do not send me .mat files. That would get very complicated. I can say, however, that the part about changing names is an EP Toolkit error message letting you know that apparently you tried to manually change the names of your data files and that doesn't work because the .fdt file still remembers the original name and so the computer gets confused.

     
  • Joe Dien

    Joe Dien - 2026-01-16

    or rather, the EP Toolkit error is saying that this is often the cause of errors at this point, so not necessarily what is happening in this particular case. I did a google on the Matlab part of the error message, and the following post suggests that what is going on is you've got an installation error. Did you follow the procedure described in the tutorial.pdf file in the Documentation folder?
    https://www.mathworks.com/matlabcentral/answers/2004917-writetable-does-not-work-error-search-term-must-be-a-text-or-pattern-scalar

     
  • Wendy

    Wendy - 2026-01-16

    Thanks for getting back to me! I double-checked and realized the issue was a MATLAB path/permission problem that made the file non-writable. After fixing it using the link you suggested, I was able to read in the data successfully. Thank you so much for your help!

     
  • Joe Dien

    Joe Dien - 2026-01-16

    Good to hear! Let me know if you run into any more issues!

    Joe

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.