<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Hi FieldTrippers,</DIV>
<DIV> </DIV>
<DIV>we are students using fieldtrip for a project at our university. Now, we
have some trouble. We want to search for muscle artifacts and we receive an
error message.</DIV>
<DIV>We started our signal processing with “ft_definetrial” to define the trials
and “ft_preprocessing” to become our data. Then we cut out the stimulus artifact
and interpolated the gaps. The data is saved as mat-file.</DIV>
<DIV> </DIV>
<DIV>Now, we are looking for muscle artifacts with the following code:</DIV>
<DIV> </DIV>
<DIV><FONT color=#4f81bd>---------- begin code --------</FONT></DIV>
<DIV><FONT color=#4f81bd>% channel selection, cutoff and padding</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.zvalue.channel = 'MEG*';</FONT></DIV>
<DIV><FONT
color=#4f81bd>cfg.artfctdef.zvalue.cutoff =
0.5;</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.zvalue.trlpadding = 0;
</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.zvalue.fltpadding = 0;</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.zvalue.artpadding =
0.1;</FONT></DIV>
<DIV><FONT color=#4f81bd></FONT> </DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.muscle.bpfilter =
'yes';</FONT></DIV>
<DIV><FONT
color=#4f81bd>cfg.artfctdef.muscle.bpfreq = [110
140];</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.muscle.bpfiltord =
2;</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.muscle.bpfilttype =
'but';</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.muscle.hilbert =
'yes';</FONT></DIV>
<DIV><FONT
color=#4f81bd>cfg.artfctdef.muscle.boxcar =
0.2;</FONT></DIV>
<DIV><FONT color=#4f81bd></FONT> </DIV>
<DIV><FONT color=#4f81bd>% make the process interactive</FONT></DIV>
<DIV><FONT color=#4f81bd>cfg.artfctdef.zvalue.interactive = 'yes';</FONT></DIV>
<DIV><FONT color=#4f81bd></FONT> </DIV>
<DIV><FONT color=#4f81bd>[cfg, artifact_muscle] = ft_artifact_zvalue(cfg,
data);</FONT></DIV>
<DIV><FONT color=#4f81bd>---------- end code --------</FONT></DIV>
<DIV> </DIV>
<DIV>Unfortunately there is an error and we haven’t an idea where is the
problem. Maybe the overlap of the trials is a reason for this. But we can’t
change this for our data because we need this trial length. Example: trial 1
from 100 to 120, trial 2 from 115 to 135.</DIV>
<DIV> </DIV>
<DIV><FONT color=#4f81bd>---------- begin error --------</FONT></DIV>
<DIV><FONT color=#4f81bd>searching for artifacts in 306 channel</FONT></DIV>
<DIV><FONT color=#4f81bd>searching trials.Error using ft_fetch_data (line
123)</FONT></DIV>
<DIV><FONT color=#4f81bd>some of the requested samples occur twice in the
data</FONT></DIV>
<DIV><FONT color=#4f81bd></FONT> </DIV>
<DIV><FONT color=#4f81bd>Error in ft_artifact_zvalue (line 260)</FONT></DIV>
<DIV><FONT color=#4f81bd> dat{trlop} =
ft_fetch_data(data, 'header',
hdr,</FONT></DIV>
<DIV><FONT color=#4f81bd> 'begsample',
trl(trlop,1)-fltpadding, 'endsample',</FONT></DIV>
<DIV><FONT color=#4f81bd> trl(trlop,2)+fltpadding,
'chanindx', sgnind, 'checkboundary',</FONT></DIV>
<DIV><FONT color=#4f81bd>
strcmp(cfg.continuous,'no</FONT></DIV>
<DIV><FONT color=#4f81bd>Error in muscle_artifacts (line 53)</FONT></DIV>
<DIV><FONT color=#4f81bd>[cfg, artifact_muscle] = ft_artifact_zvalue(cfg,
data);”</FONT></DIV>
<DIV><FONT color=#4f81bd>---------- end error --------</FONT></DIV>
<DIV> </DIV>
<DIV>Do you have any idea to help us? We would be grateful for any help.</DIV>
<DIV> </DIV>
<DIV>Greetings,</DIV>
<DIV>Joerg</DIV></DIV></DIV></BODY></HTML>