physionet
physionet copied to clipboard
Bug in Cross-Sampen for Matlab
The reference at the top of the function mentions that sflag
enables standardizing of the two signals via the snippet below. But this code does nothing to normalize the two signals, and I believe it is the y=y/sx
that is to blame. I would think it should be x=x/sx
instead, unless I'm mistaken.
if sflag>0
y=y-mean(y);
sy=sqrt(mean(y.^2));
y=y/sy;
x=x-mean(x);
sx=sqrt(mean(x.^2));
y=y/sx;
end
before the code, two example sets plot like this:
after the code:
with y=y/sx
changed to x=x/sx
:
This indicates to me that it is indeed an error.
Should I have created this issue somewhere else?