<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>HI all-<o:p></o:p></p><p class=MsoNormal> I use CFT data sets in which I use a trigger channel to define various stimuli (usually called stim1, stim2, stim3). Each stim repeats several times (120) during the data file. The time points corresponding to each stim are catalogued in the MarkerFile.mrk file. I would like to use these markers to define trials around each stim. I used to do this with the following set of commands:<o:p></o:p></p><p class=MsoNormal> cfg = [];<o:p></o:p></p><p class=MsoNormal> cfg.dataset = ‘TS1.ds’;<o:p></o:p></p><p class=MsoNormal> cfg.trialdef.eventtype = ‘stim1’;<o:p></o:p></p><p class=MsoNormal> cfg.trialdef.prestim = 0.1;<o:p></o:p></p><p class=MsoNormal> cfg.trialdef.posstim = 3.0;<o:p></o:p></p><p class=MsoNormal> cfg = ft_definetrial(cfg)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Now when I do this I get the following error messages:<o:p></o:p></p><p class=MsoNormal> readCTFds: Data set error: size of meg4 files(s)<o:p></o:p></p><p class=MsoNormal> 0 bytes (from dir command)<o:p></o:p></p><p class=MsoNormal> 1126080000 (from res4 file)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> ??? Attempt to reference field of non-structure array.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Error in <span style='font-family:Wingdings'>è</span> trialfun_general at 111<o:p></o:p></p><p class=MsoNormal> For i=find(strcmp(cfg.trialdef.eventtype, {event.types}))<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> Error in<span style='font-family:Wingdings'>è</span> ft_definetrial at 126<o:p></o:p></p><p class=MsoNormal> [trl, event] = feval(cfg.trialfun, cfg)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Is this a problem with the way I am defining the events? How can I use these markers within the data file to specify events in fieldtrip?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Beth Belluscio MD-PhD<o:p></o:p></p><p class=MsoNormal>Clinical Fellow<o:p></o:p></p><p class=MsoNormal>Human Motor Control Section<o:p></o:p></p><p class=MsoNormal>NINDS, NIH<o:p></o:p></p><p class=MsoNormal>301-402-3495<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>