<div>Dear all,</div><div> </div><div>I have recently use the function ft_spikedetection to extract spike information from continous data. When I set the cfg.interactive= 'yes' , the function can run well only with the warning that data was not write in to disk in interactive mode. When I change the cfg.interactive ='no' to let the function write the spike into disk, there is a error like this</div>
<div> </div><div>??? Undefined function or method 'ft_write_spike' for input arguments of type 'struct'.</div><div>Error in ==> ft_spikedetection at 377<br>      ft_write_spike(datafile, spike, 'dataformat', cfg.dataformat, 'fsample', hdr.Fs, 'TimeStampPerSample',<br>
      hdr.TimeStampPerSample*hdr.Fs);</div><div> </div><div>So, it seems because it did not find the ft_write_spike. I check the  latest and old Fieldtrip versions but did not find ft_write_spike neither. I have no idea how to solve this problem. Thank you for your kind help in advance. Any help on this matter will be really appreciated</div>
<div> </div><div>All the best</div><div> </div><div>Jing</div>