Problems with Frequency Analysis
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Maazah Ali
le 31 Juil 2015
Commenté : Star Strider
le 31 Juil 2015
I'm getting this error when running frequency analysis:
Undefined function 'ft_preprocessing' for input arguments of type 'struct'.
Error in freqanalysis_avg (line 23) data = ft_preprocessing(pcfg,data);
Error in super_freqanalysis_avg (line 57) freqanalysis_avg(cfg);
This is the preview of the Editor:
function super_freqanalysis_avg(mysubjects)
rootpathname = 'C:\data\';
directories = { 'P1\'; 'P2\'; 'P3\'; 'P4\'; 'P5\'; 'P6\'; 'P7\'; 'P8\'; 'P9\'; 'P10\'; 'P11\'; 'P12\'; 'P13\'; 'P14\'; 'P15\'; 'P16\'; };
subjectnumbers = { '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; '10'; '11'; '12'; '13'; '14'; '15'; '16'; };
if nargin < 1 mysubjects = 1:length(directories) end;
for isub = mysubjects
for isess = 1:4
cfg.pathname = [rootpathname,directories{isub}];
cfg.cleanrestfname = [cfg.pathname,'datarestClean_',subjectnumbers{isub},'_',num2str(isess)];
cfg.cleanfname = [cfg.pathname,'datamazeClean',subjectnumbers{isub},'_',num2str(isess)];
cfg.freqfname = [cfg.pathname,'freqavg',subjectnumbers{isub},'_',num2str(isess)];
freqanalysis_avg(cfg);
end;
end;
If somebody could help in identifying where the problem lies and how to fix it, I'd greatly appreciate it. Thanks.
0 commentaires
Réponse acceptée
Star Strider
le 31 Juil 2015
Put the entire toolbox (whatever one you’re using) in the same sub-directory on your MATLAB path, and then be certain that directory is on your MATLAB path. See the documentation on Search Path for relevant details and functions.
2 commentaires
Star Strider
le 31 Juil 2015
I’m just guessing because I don’t have all the information. Those errors usually arise when MATLAB cannot find the function (or that the function doesn’t accept structures as arguments).
First, type this in the Command Window:
which ft_preprocessing -all
and see what the result is.
Your best option at this point is probably to contact whoever wrote the third-party toolbox you’re working with and ask them. Be sure to tell them that you checked with the path and which functions, and you are certain that the entire toolbox is in your MATLAB search path.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!