[Eeglablist] using pop-saveset

Victor Pokorny pokor076 at umn.edu
Sat Feb 11 10:13:14 PST 2023


Hi there,
I've actually never responded to a post on here so I apologize if this is
not the way to do it, but I had a similar problem pop-up recently that I
was able to resolve by adding the extra argument: 'savemode','onefile'

e.g.
pop_saveset(EEG(index), 'filename', sprintf('file%d.set', index),
'savemode', 'onefile');

Hope that helps!
Victor Pokorny

On Sat, Feb 11, 2023 at 11:36 AM K Jeffrey Eriksen <kjefferiksen at comcast.net>
wrote:

> To support:
>
>
>
> What is wrong with this simple example? I simply want to modify the
> EEG-data
> array and save it back out to a new SET file. How should I accomplish this?
>
>
>
> Thanks,
>
> -Jeff
>
>
>
> % test modifying EEG.data and saving new SET file
>
> filepath = ['D:\Research\memory project\hdEEG data\SCP_S01'];
>
> fileID = 'original';
>
> filename = strcat(fileID,'.set');
>
>
>
> [EEG] = pop_loadset(filename, filepath);
>
>
>
> Fs = EEG.srate;
>
> newdata = EEG.data/2; % this is just a simple example of a modification
>
> EEG.data = newdata;
>
>
>
> outfileID = 'new_modified';
>
> outfilename = strcat(outfileID,'.set');
>
> [EEG] = pop_saveset(filename, filepath); % this is line 17 - see error
> below
>
>
>
> for index = 1:length(EEG)
>
>        pop_saveset(EEG(index), 'filename', sprintf('file%d.set', index));
>
> end;
>
>
>
> Error using pop_saveset
>
> For reasons of consistency, this function does not save multiple datasets
> any
>
> more
>
>
>
> Error in testmod (line 17)
>
> [EEG] = pop_saveset(filename, filepath);
>
>
>
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>



More information about the eeglablist mailing list