[Eeglablist] Script Writing - cell of string vs char

Nick Heredia n_heredia at u.pacific.edu
Tue May 5 12:12:00 PDT 2020


To whom it may concern,

I used your pages to help automate my processes. I understand there are a
few ways to create strings (for the purpose of loading and save
directories).

My issue is that I come across errors that push me to format the strings in
different ways. Apologies if this is already featured in your documentation.

For example, when I create a load directory, it is a 1x1 cell of a string
ldPath={'C:/some_location/eeg_data.set'}.
This line is slightly deceiving because I don't declare an explicit string;
rather I iterate through my subjects and hours and use strcat() to bring
the subject number and the hour numbers together to load and save my data.
 The above method creates a 1x1 cell, as I mentioned, which works passing
through in pop_importdata. However, I use the same variable method
svPath={'C:/some_other_location/eeg_otherData.set'}
 for pop_newset, and this method doesn't work. I have to pass svPath{:}.
The implication is that I have to pass a cell array to pop_importdata, but
a char string to pop_newset. Is there a reason for this disparity?

-- 
With Gratitude
-
Nicholas Heredia



More information about the eeglablist mailing list