home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ccccssssccccaaaallll1111dddd,,,,zzzzssssccccaaaallll1111dddd((((3333FFFF)))) ccccssssccccaaaallll1111dddd,,,,zzzzssssccccaaaallll1111dddd((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- ccccssssccccaaaallll1111dddd,,,, zzzzssssccccaaaallll1111dddd ---- scales a 1D real sequence.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccssssccccaaaallll1111dddd(((( nnnn,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc))))
- iiiinnnntttteeeeggggeeeerrrr nnnn,,,, iiiinnnncccc
- rrrreeeeaaaallll aaaallllpppphhhhaaaa
- ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((0000::::((((nnnn----1111))))****iiiinnnncccc))))
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzssssccccaaaallll1111dddd(((( nnnn,,,, aaaallllpppphhhhaaaa,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc))))
- iiiinnnntttteeeeggggeeeerrrr nnnn,,,, iiiinnnncccc
- rrrreeeeaaaallll****8888 aaaallllpppphhhhaaaa
- ccccoooommmmpppplllleeeexxxx****11116666 aaaarrrrrrrraaaayyyy((((0000::::((((nnnn----1111))))****iiiinnnncccc))))
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccssssccccaaaallll1111dddd (((( iiiinnnntttt nnnn,,,, ffffllllooooaaaatttt aaaallllpppphhhhaaaa,,,, ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,, iiiinnnntttt iiiinnnncccc))));;;;
- iiiinnnntttt zzzzssssccccaaaallll1111dddd (((( iiiinnnntttt nnnn,,,, ddddoooouuuubbbblllleeee aaaallllpppphhhhaaaa,,,, zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,, iiiinnnntttt iiiinnnncccc))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ccccssssccccaaaallll1111dddd and zzzzssssccccaaaallll1111dddd scale a complex sequences of N samples.
- The Fourier Transforms are not normalized so the succession Direct-
- Inverse transform scales the input data by a factor equal to the size of
- the transform. ccccssssccccaaaallll1111dddd or zzzzssssccccaaaallll1111dddd are used to scale back the result.
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- NNNN Integer, the number of samples in each sequence.
- Unchanged on exit.
-
- AAAAllllpppphhhhaaaa scaling floating point value.
-
- AAAARRRRRRRRAAAAYYYY Array containing the samples of the sequence to be scaled (in
- place0.
-
- IIIINNNNCCCC Integer, increment between two consecutive elements of a sequence.
- Unchanged on exit.
-
- PPPP Integer, the number of sequences. Unchanged on exit.
-
-
- EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
- Given a 1D Complex sequence of 200 samples. We successively apply a
- Direct Fourier Transform, an Inverse Fourier Trasnform and finally scale
- back the result by a factor 1/N (1/200.)-
- This sequence DirectFFT-InverseFFT-Scaling is equivalent to the identity
- operator and the final sequence should be equal (with round-off
- precision) to the initial sequence.
- Elements of each sequence are stored with increment (stride) 1.
- FFFFoooorrrrttttrrrraaaannnn ::::
- complex array(0:200-1), coeff(200+15)
- call cfft1di( 200, coeff)
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ccccssssccccaaaallll1111dddd,,,,zzzzssssccccaaaallll1111dddd((((3333FFFF)))) ccccssssccccaaaallll1111dddd,,,,zzzzssssccccaaaallll1111dddd((((3333FFFF))))
-
-
-
- call cfft1d( -1, 200, array, 1, coeff)
- call cfft1d( 1, 200, array, 1, coeff)
- call cscal1d(200,(1./real(200)),array,1)
-
- CCCC ::::
- #include <fft.h>
- complex array[200], *coeff;
- coeff = cfft1di( 200, NULL);
- cfft1d( -1, 200, array, 1, coeff);
- cfft1d( 1, 200, array, 1, coeff);
- cscal1d( 200, 1./(float)200, array, 1);
-
- NNNNOOOOTTTTEEEE____1111 :::: The Direct and Inverse transforms should use opposite signs -
- Which one is used (+1 or -1) for Direct transform is just a matter of
- convention-
-
- NNNNOOOOTTTTEEEE____2222 :::: The Fourier Transforms are not normalized so the succession
- Direct-Inverse transform scales the input data by a factor equal to the
- size of the transform.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, cfft1di, zfft1di, cfft1d, zfft1d, sprod1d, dprod1d
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-