You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(n==0&& !withDC) /* discard DC and keep Nyquist */
{
++n;
}
#ifdefUSE_OOURA
/*
if(n==1 && withDC) // discard Nyquist
{
++n;
}
*/
// OOURA discards the always 0 imaginary of DC and Nyquists
if (n==M&& !withDC)
{
real=fft[1];
imag=0.0;
}
elseif (n==0&&withDC) {
real=fft[0];
imag=0.0;
}
else {
real=fft[n*2];
imag=fft[n*2+1];
}
#else
if (n==M&& !withDC)
{
real=fft->imagp[0];
imag=0.0;
}
elseif (n==0&&withDC) {
real=fft->realp[0];
imag=0.0;
}
else {
real=fft->realp[n];
imag=fft->imagp[n];
}
#endif
result[m*2] =real;
result[m*2+1] =imag;
XTRACT_SET_FREQUENCY;
XTRACT_GET_MAX;
}
break;
}
I was trying to implement a higher level API in Julia and I've found these two lines that seem wrong to me. Shouldn't it compute the euclidean distance between imag and real? The following two lines seems copied from the previous clause:
LibXtract/src/vector.c
Lines 323 to 373 in 41273dd
I was trying to implement a higher level API in Julia and I've found these two lines that seem wrong to me. Shouldn't it compute the euclidean distance between
imag
andreal
? The following two lines seems copied from the previous clause:LibXtract/src/vector.c
Lines 367 to 368 in 41273dd
If you confirm, I can do a pull request
The text was updated successfully, but these errors were encountered: