[FieldTrip] Fieldtrip tutorial error: trialfun

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Thu Feb 23 09:25:58 CET 2012


Dear Jessamy,

This looks like you are calling the function from the wrong directory.

I can reproduce your error when I call ft_redefinetrial from the following location:


XXXXXX/Subject01.ds

instead, you should call the function from:

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')

Best wishes,

Jan-Mathijs


On Feb 23, 2012, at 4:28 AM, Jessamy Norton-Ford wrote:

> Hello,
> 
> I am new to Fieldtrip, and have run into the following problems running through the tutorial
> 
> cfg = [];                                           % empty configuration
> cfg.dataset                 = 'Subject01.ds';       % name of CTF dataset  
> cfg.trialdef.eventtype      = 'backpanel trigger';
> cfg.trialdef.prestim        = 1;
> cfg.trialdef.poststim       = 2;
> cfg.trialdef.eventvalue     = 3;                    % event value of FIC
> cfg = ft_definetrial(cfg); 
> 
> Warning: no trialfun was specified, using trialfun_general 
> 
> > In ft_definetrial at 123
> evaluating trialfunction 'trialfun_general'
> 
> Warning: adding
> /Users/jessamynorton-ford/Documents/MATLAB/fieldtrip-20120222/external/ctf
> toolbox to your Matlab path 
> 
> readCTFds: Data set error : size of meg4 file(s)
> 		         0 bytes (from dir command)
> 		 179071200 bytes (from res4 file)
> 
> reading the events from 'Subject01.ds/Subject01.res4'
> 
> readCTFds: Data set error : size of meg4 file(s)
> 		         0 bytes (from dir command)
> 		 179071200 bytes (from res4 file)
> 
> ??? Attempt to reference field of non-structure array.
> 
> Error in ==> trialfun_general at 118
>   sel = ismember({event.type}, cfg.trialdef.eventtype);
> 
> Error in ==> ft_definetrial at 166
>     [trl, event] = feval(cfg.trialfun, cfg);
> 
> I found a somewhat similar issue on the boards from May 2011 (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003827.html), 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:
> 
> fieldtrip-20111004
> fieldtrip-20111101
> fieldtrip-20120220
> fieldtrip-20120222
> 
> here is my ver info in case it is helpful:
> 
> MATLAB Version 7.11.0.584 (R2010b)
> 
> Operating System: Mac OS X  Version: 10.6.2 Build: 10C540 
> Java VM Version: Java 1.6.0_15-b03-219 with Apple Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
> -------------------------------------------------------------------------------------
> 
> Any suggestions of likely incompatibilities/mistakes on my part would be most helpful.
> 
> Thank you,
> 
> -- 
> Jessamy Norton-Ford
> Doctoral Student, Department of Cognitive Sciences
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120223/5953d0bf/attachment.html>


More information about the fieldtrip mailing list