<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Jessamy,<div><br></div><div>This looks like you are calling the function from the wrong directory.</div><div><br></div><div>I can reproduce your error when I call ft_redefinetrial from the following location:</div><div><br></div><div><br></div><div>XXXXXX/Subject01.ds</div><div><br></div><div>instead, you should call the function from:</div><div><br></div><div>XXXXXX, i.e. one directory up (so type 'cd ../' to get there), or use an absolute path in cfg.dataset (i.e. cfg.dataset = '/XXXXXX/Subject01.ds')</div><div><br></div><div>Best wishes,</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br><div><div>On Feb 23, 2012, at 4:28 AM, Jessamy Norton-Ford wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,</div><div><br></div><div>I am new to Fieldtrip, and have run into the following problems running through the tutorial</div><div><br></div><div><font face="'courier new', monospace">cfg = [];                                           % empty configuration</font></div>

<div><font face="'courier new', monospace">cfg.dataset                 = 'Subject01.ds';       % name of CTF dataset  </font></div><div><font face="'courier new', monospace">cfg.trialdef.eventtype      = 'backpanel trigger';</font></div>

<div><font face="'courier new', monospace">cfg.trialdef.prestim        = 1;</font></div><div><font face="'courier new', monospace">cfg.trialdef.poststim       = 2;</font></div><div><font face="'courier new', monospace">cfg.trialdef.eventvalue     = 3;                    % event value of FIC</font></div>

<div><font face="'courier new', monospace">cfg = ft_definetrial(cfg); </font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">Warning: no trialfun was specified, using trialfun_general </font></div>

<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">> In ft_definetrial at 123</font></div><div><font face="'courier new', monospace">evaluating trialfunction 'trialfun_general'</font></div>

<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">Warning: adding</font></div><div><font face="'courier new', monospace">/Users/jessamynorton-ford/Documents/MATLAB/fieldtrip-20120222/external/ctf</font></div>

<div><font face="'courier new', monospace">toolbox to your Matlab path</font><font face="'courier new', monospace" color="#ff0000"> </font></div><div><font face="'courier new', monospace"><br></font></div>

<div><font face="'courier new', monospace">readCTFds: Data set error : size of meg4 file(s)</font></div><div><font face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">              </span>         0 bytes (from dir command)</font></div>

<div><font face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">                </span> 179071200 bytes (from res4 file)</font></div><div><font face="'courier new', monospace"><br></font></div>

<div><font face="'courier new', monospace">reading the events from 'Subject01.ds/Subject01.res4'</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">readCTFds: Data set error : size of meg4 file(s)</font></div>

<div><font face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">                </span>         0 bytes (from dir command)</font></div><div><font face="'courier new', monospace"><span class="Apple-tab-span" style="white-space:pre">           </span> 179071200 bytes (from res4 file)</font></div>

<div><font face="'courier new', monospace" color="#ff0000"><br></font></div><div><font face="'courier new', monospace" color="#ff0000">??? Attempt to reference field of non-structure array.</font></div><div>

<font face="'courier new', monospace" color="#ff0000"><br></font></div><div><font face="'courier new', monospace" color="#ff0000">Error in ==> trialfun_general at 118</font></div><div><font face="'courier new', monospace" color="#ff0000">  sel = ismember({event.type}, cfg.trialdef.eventtype);</font></div>

<div><font face="'courier new', monospace" color="#ff0000"><br></font></div><div><font face="'courier new', monospace" color="#ff0000">Error in ==> ft_definetrial at 166</font></div><div><font face="'courier new', monospace" color="#ff0000">    [trl, event] = feval(cfg.trialfun, cfg);</font></div>

<div><br></div><div>I found a somewhat similar issue on the boards from May 2011 (<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003827.html">http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003827.html</a>), and have since tried several instantiations of FieldTrip (though the version I was running when I first got the error was actually very new). So far I have tried:</div>

<div><br></div><div>fieldtrip-20111004</div><div>fieldtrip-20111101</div><div>fieldtrip-20120220</div><div>fieldtrip-20120222</div><div><br></div><div>here is my <font face="'courier new', monospace">ver</font> info in case it is helpful:</div>

<div><font face="'courier new', monospace"><br></font></div><div><div><font face="'courier new', monospace">MATLAB Version 7.11.0.584 (R2010b)</font></div><div><font face="'courier new', monospace"><br>

</font></div><div><font face="'courier new', monospace">Operating System: Mac OS X  Version: 10.6.2 Build: 10C540 </font></div><div><font face="'courier new', monospace">Java VM Version: Java 1.6.0_15-b03-219 with Apple Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode</font></div>

<div>-------------------------------------------------------------------------------------</div></div><div><br></div><div>Any suggestions of likely incompatibilities/mistakes on my part would be most helpful.</div><div><br>

</div><div>Thank you,</div><div><br></div>-- <br>Jessamy Norton-Ford<br>Doctoral Student, Department of Cognitive Sciences<br><br>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></body></html>