[FieldTrip] FFT on EMG data

Holly Rossiter H.Rossiter at ion.ucl.ac.uk
Wed Apr 20 12:48:08 CEST 2011


Hi,

 

I am trying to run an FFT on some EMG data to obtain the peak frequency.
This is the script I am using...

 

D= spm_eeg_load;

emg = D.ftraw(0);

 

cfg=[];

 

       cfg.method='mtmfft';

       cfg.output='pow';

       cfg.taper='hanning';

       cfg.channel={'Lforearm'};

       cfg.foi= [5 80];% frequency band - foilim or just foi??

       freq=ft_freqanalysis(cfg,emg);

       

     figure

semilogy(freq.freq, freq.powspctrm(1,:), 'b-');

 

However, I keep getting this error...

 

processing trial 1, ??? Undefined function or variable "dum".

 

Error in ==> ft_freqanalysis_mtmfft at 345

      fprintf('nfft: %d samples, taper length: %d samples, %d

      tapers\n',length(dum),size(tap,2),numtap);

 

Error in ==> ft_freqanalysis at 111

  [freq] =

  feval(sprintf('ft_freqanalysis_%s',lower(cfg.method)), cfg,

  data);

 

Do you know how to fix this error?

 

Thanks,

 

Holly

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110420/508337c6/attachment-0001.html>


More information about the fieldtrip mailing list