Error using ==> nargout
Gijs van Elswijk
G.vanElswijk at NEURO.UMCN.NL
Tue Oct 11 21:56:33 CEST 2005
Hi,
You have defined a trial function with the name "trialfun_ctf_epoched" in the cfg structure. Supposedly, this function (.m file) does not exist (or is not found somewhere in the matlab path). Therefore, during preprocessing "nargout" is called with an non-existing .m file as parameter and returns with an error.
I've had the same problem recently. The solution would normally be to set cfg.trialfun to an existing trial function or to create a trial function with name "trialfun_ctf_epoched". However, in the sample dataset of the tutorial no trial function was (is?) included, and I think it is a bit hard to make one if you don't know how trials are marked in the raw data.
Jan-Mathijs has sent me an .m file with a trialfunction that worked for this tutorial. Jan-Mathijs, is it allright if I forward that file to Kambiz?
Gijs
-----Original Message-----
From: FieldTrip discussion list on behalf of Kambiz Tavabi
Sent: Tue 10/11/2005 4:26 PM
To: FIELDTRIP at NIC.SURFNET.NL
Cc:
Subject: [FIELDTRIP] Error using ==> nargout
The errors below result from running the excerpt code provided in the
FIELDTRIP tutorial/example MATLAB script for Time Frequency analysis. My
MATLAB work directory is set to $:\Matlab\work\FIELDTRIP which contains the
folder 'Subject01.ds' and associated head shape/MRI files.
Any suggestions on what I am doing wrong?
>> cfg = [];
cfg.dataset = 'Subject01.ds';
cfg.channel = {'MEG' 'STIM'};
cfg.trialdef.excludeConditions = {'BAD'};
cfg.trialdef.includeTrigger = 3;
cfg.detrend = 'yes';
dataFIC = preprocessing(cfg);
evaluating trialfunction 'trialfun_ctf_epoched'
??? Error using ==> nargout
Not a valid M-file.
Error in ==> definetrial at 141
num = nargout(cfg.trialfun);
Error in ==> preprocessing at 263
[cfg] = definetrial(cfg);
============================================
Kambiz Tavabi, Dipl. Psych., MS.
Institute for Biomagnetism and Biosignalanalysis
Muenster University Hospital
Malmedyweg 15
D-48149 Muenster
Germany
phone: +49-(0)251-83-56884
fax: +49-(0)251-83-56874
e-Mail: Kambiz.Tavabi at uni-muenster.de
============================================
More information about the fieldtrip
mailing list