[FieldTrip] error using ft_artifact_zvalue

Hwee Ling Lee hweeling.lee at gmail.com
Thu Oct 17 16:02:32 CEST 2013


Hi!

I'm using the command ft_artifact_zvalue, and would like to use the
interactive mode.

However, I keep getting an error message:

Error using ft_artifact_zvalue (line 216)
no channels selected.

I wonder if I require to specify the channels manually. Thanks!

Here's my script:
clear all; close all; clc;
warning off;

fs = filesep;

% loading eeg files for fieldtrip
cfg = [];
cfg.dataset = 'D:\Data\DBSmechanisms_v2\export\gudin-stimrec.eeg';
cfg.event = 'D:\Data\DBSmechanisms_v2\export\gudin-stimrec.vmrk';

% loading stimulus information
cfg.trialfun = 'my_trialfun_name'; % self-made function located in
D:\New_Scripts_2013\my_trialfun_name.m
cfg.trialdef.pre = 1.0;
cfg.trialdef.post = 1.0;
cfg = ft_definetrial(cfg);

[data] = ft_preprocessing(cfg); % loading eeg data into memory

% to filter 50 Hz 'humming' of electric power supply
cfg.bsfiler = 'yes';
cfg.bsfreq = [49 51; 99 100; 149 151];
[data] = ft_preprocessing(cfg); % loading eeg data into memory

% automatic artifact rejection
cfg.artfctdef.zvalue.channel = 'eeg';
cfg.artfctdef.zvalue.cutoff = 0.5;
cfg.artfctdef.zvalue.trlpadding = 0;
cfg.artfctdef.zvalue.fltpadding = 0;
cfg.artfctdef.zvalue.artpadding = 0;

[cfg, artifact] = ft_artifact_zvalue(cfg, data);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20131017/5f210a2c/attachment.html>


More information about the fieldtrip mailing list