[FieldTrip] Bug in ft_freqcomparison.m?
Alexander Maye
a.maye at uke.de
Wed Mar 13 17:07:06 CET 2013
Hi All,
I just spotted something that could be a bug in ft_freqcomparison.m
(fieldtrip-20130312 and previous versions). Don't now if this is the place for
report, but if this really is an issue everyone using this function may be
interested.
The problem is in line 87 where freq = varargin{1}; is initialized to the
*first* freq argument, that according to the doc is used as the norm. So the
output (powspctrm) has the dimension of the norm, not the second freq
argument, that one wants to become normalized. Strange, hmm? Then, in the
following for-loops the index variable runs over the size of the *second* freq
argument, updating trials in the powspctrm with the size of the *first* freq
argument, which seems simply wrong.
Maybe this is an ingenious programming trick, but initializing freq =
varargin{2}; on line 87 would make more sense from my point of view.
Best,
ALEX.
-------------- next part --------------
--
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):
Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg
Vorstandsmitglieder: Prof. Dr. Martin Zeitz (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130313/38126232/attachment-0001.html>
More information about the fieldtrip
mailing list