[Eeglablist] Add data channel
Arnaud Delorme
arno at ucsd.edu
Sun Dec 8 13:28:00 PST 2013
If your 4 channels are in dataset 1, that would be the script
channel_indices = [1 2 3 4];
EEG.data(end+1:end+4,:) = ALLEEG(1).data(channel_indices,:);
EEG.nbchan = size(EEG.data,1);
if ~isempty(EEG.chanlocs)
EEG.chanlocs(end+1).labels = '';
EEG.chanlocs(end+1).labels = '';
EEG.chanlocs(end+1).labels = '';
EEG.chanlocs(end+1).labels = '';
end;
EEG.saved = 'no';
[ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET);
eeglab redraw
Arno
On Dec 4, 2013, at 7:46 AM, kknaepen <kknaepen at vub.ac.be> wrote:
> Dear,
>
> I would like to add four channels from another dataset (which are
> already in a .set file format) to an existing EEG dataset. Both datasets
> are equally long, equal sample rate and synchronized.
>
> I found how to add a new EMPTY channel on a previous message:
>
> EEG.data(end+1,:) = 0;
> EEG.nbchan = size(EEG.data,1);
> if ~isempty(EEG.chanlocs)
> EEG.chanlocs(end+1).label = '';
> end;
> [ALLEEG EEG CURRENTSET] = eeg_store(ALLEEG, EEG, CURRENTSET);
> eeglab redraw
>
> Could anyone help me change this sript so I could load 4 existing
> channels into another dataset, please?
>
> Thanks,
>
> Kristel
> _______________________________________________
> 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