bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] A little documentation mistake


From: Alexandre Zabot
Subject: [Bug-gsl] A little documentation mistake
Date: Wed, 20 Dec 2006 15:49:57 -0200

Hi Brian,

I found a little mistake in the section
"15.6 Radix-2 FFT routines for real data"
of the GSL documentation:

In the table showing the arrangement of the output data is written
complex[k'].imag   =   -data[N-k]
but the right is
complex[k'].imag   =   -data[k']

isn't it?

I'd like to give you a suggestion, too: why don't you write a simple
c-example,
like this one:

int n=N/2;

for( int i=0   ; i<=n2; i++ ){
 complex[i].real = data[i];
}
for( int i=n2+1; i<N ; i++ ){
 complex[i].real = data[N-i];
}

complex[0].imag = 0.0;
complex[1].imag = data[N-1];
for( int i=2   ; i<n2 ; i++ ){
 complex[i].imag =  data[N-i];
}
complex[n2].imag = 0.0;
for( int i=n2+1; i<_N ; i++ ){
 complex[i].imag = -data[i];
}


It's simpler to one who just wants to do a "copy and paste" approach.


--
Cheers,
Alexandre Zabot
Universidade Federal de Santa Catarina
Departamento de FĂ­sica
Grupo de AstrofĂ­sica


reply via email to

[Prev in Thread] Current Thread [Next in Thread]