<div>Dear Fieldtrip developers and users,</div>
<div> </div>
<div>I have found same error when I using ft_spiketriggeredaverage and ft_spiketriggeredspectrum.m. </div>
<div>After I run the following script, an error appeared at line 51 cfg=ft_checkconfig. This error also is same when I run ft_spiketriggeredspectrum.m. But after I use comment to silent a part of these functions. it could work well. It is same for both the latese and 20120420 version of Fieldtrip. I donnot know whether it is a bug or something wrong with my data? Would anybody who knows can help me?
<div>That will be really appreciated! Thanks in advance!</div></div>
<div>Jing</div>
<div> </div>
<div>I have append spike and LFP into data. The folloing is the script and error information.</div>
<div><em>cfg=[];<br>cfg.timwin = [-0.01 0.01];<br>cfg.spikechannel =data.label{1};<br>cfg.channel = data.label{2};<br>cfg.keeptrials ='yes';<br>cfg.feedback='yes';<br>[timelock] = ft_spiketriggeredaverage(cfg, data);</em></div>
<div><em></em> </div>
<div><em>Error using ft_getopt<br>the first input should contain key-value pairs</em></div>
<div><em>Error in ft_checkconfig (line 83)<br>renamed = ft_getopt(varargin, 'renamed');</em></div>
<div><em>Error in ft_spiketriggeredaverage (line 51)<br>cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...</em></div>
<div> </div>
<div>
<div>For ft_spikertriggerespectrum, I silent the line like this, the script can work well.</div>
<div><em>% cfg = ft_checkconfig(cfg, 'forbidden', 'inputfile', ...<br>% 'outputfile'); % see </em><a href="http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056"><em>http://bugzilla.fcdonders.nl/show_bug.cgi?id=1056</em></a></div>
<div> </div>
<div>For ft_spiketriggeredaverage, the script can work when I silent these part. it can work well.</div>
<div><em> % cfg.timwin = ft_getopt(cfg, 'timwin',[-0.1 0.1]);<br> % cfg.spikechannel = ft_getopt(cfg,'spikechannel', []);<br> % cfg.channel = ft_getopt(cfg,'channel', 'all');<br>
% cfg.keeptrials = ft_checkopt(cfg,'keeptrials', 'char', {'yes', 'no'});<br> % cfg.feedback = ft_checkopt(cfg,'feedback', 'yes');<br></em></div></div>