Do I need ECG channel to run "artifact_ecg"
Stancak, Andrej
A.Stancak at LIVERPOOL.AC.UK
Thu Apr 23 10:01:15 CEST 2009
Dear Jim-Li,
I probably faced the same error message when I was writing my script for ECG artefact removal. I remember to get rid of this error message by putting the ECG channel label into brackets:
cfg.artfctdef.ecg.channel = {'A229'};
I hope I have not mislead you as I am a FieldTrip novice, but it is maybe worth trying.
Best wishes
Andrej
Andrej Stancak, PhD.
Professor for normal physiology
Senior lecturer in psychology
School of Psychology
Eleanor Rathbone Building
Bedford Street South
L69 7ZA
Liverpool
United Kingdom
Phone: 0044 0151 7946951
E-mail: a.stancak at liverpool.ac.uk (primary)
stancak at lf3.cuni.cz (secondary)
Office hours: Mo 10-12, Wed 10-12
-----Original Message-----
From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Jim Li
Sent: 22 April 2009 17:23
To: FIELDTRIP at NIC.SURFNET.NL
Subject: [FIELDTRIP] Do I need ECG channel to run "artifact_ecg"
Dear all,
W/ a 041809 Fieldtrip, I tried to run the following lines but got some error (see
below). I don't have ECG channel in my data, that's why I use a left-most
MEG channel w/ apparent cardiac interferences instead. Any suggestion how
to fix the problem?
-------------
cfg = [];
cfg.trl = data.cfg.previous.trl;
cfg.dataset = data.cfg.previous.dataset;
cfg.continuous = 'yes' ;
cfg.artfctdef.ecg.channel = 'A229';
cfg.artfctdef.ecg.pretim = 0.25;
cfg.artfctdef.ecg.psttim = 0.5;
cfg.artfctdef.ecg.method = 'zvalue'; %peak-detection method
cfg.artfctdef.ecg.cutoff = 3; %peak-threshold
[cfg, artifact] = artifact_ecg(cfg);
current zvalue threshold = 3.000
keep the current value (y/n) ?
y
??? Undefined function or variable "labelmlt".
Error in ==> channelselection at 344
if findmlt, channel = [channel; labelmlt]; end
Error in ==> artifact_ecg at 238
sgn = channelselection(artfctdef.inspect, hdr.label);
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
More information about the fieldtrip
mailing list