Error in FREQANALYSIS
McAuley, Grant (LLU)
gmcauley at LLU.EDU
Wed Mar 14 20:32:51 CET 2007
I am seeing an error in FREQANALYSIS (see output below). It seems centered around the 'cfg.tapper' field. I have tried 'dpss', 'hanning' (output below), and 'sine' (which gives an Out of Memory Error). (Not sure where to find info on WINDOW).
My data is in a structure as described here:
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:frequently_asked_questions
(How can I import my own dataformat?)
Relevant MATLAB output is below.
Pardon me if I am missing something obvious - this is new territory for me. Any ideas on what might be the problem?
% my data structure with example values
>> hv1_69
hv1_69 =
label: {2x1 cell}
fsample: 200
trial: {[2x48528 double]}
time: {[1x48529 double]}
>> hv1_69.trial{1}(1,1:5)
ans =
4.9460 4.2540 1.9510 0.0820 0.6380
>> hv1_69.time{1}(1,1:5)
ans =
0 0.0050 0.0100 0.0150 0.0200
% here are cfg values
>> cfg
cfg =
output: 'pow'
method: 'mtmfft'
tapsmofrq: 4
pad: 'maxperlen'
taper: 'dpss'
foilim: [0 100]
>> [freq] = freqanalysis(cfg, hv1_69);
??? Undefined function or method 'dpss' for input arguments of type 'double'.
Error in ==> freqanalysis_mtmfft>double_dpss at 560
tap = dpss(double(a), double(b), varargin{:});
Error in ==> freqanalysis_mtmfft at 387
tap = double_dpss(numdatbns,numdatbns*(cfg.tapsmofrq./data.fsample))';
Error in ==> freqanalysis at 193
[freq] = feval(sprintf('freqanalysis_ü·¢xÞ',lower(cfg.method)), cfg, data);
% try different 'cfg.taper' value
>> cfg.taper = 'hanning';
>> [freq] = freqanalysis(cfg, hv1_69);
??? Undefined function or method 'window' for input arguments of type 'char'.
Error in ==> freqanalysis_mtmfft at 393
tap = window(cfg.taper, numdatbns)';
Error in ==> freqanalysis at 193
[freq] = feval(sprintf('freqanalysis_ü·¢xÞ',lower(cfg.method)), cfg, data);
%MATLAB version
>> version
ans =
7.3.0.267 (R2006b)
More information about the fieldtrip
mailing list