public
Description: Perl interface to the GNU Scientific Library
Homepage: http://leto.net/code/Math-GSL
Clone URL: git://github.com/leto/math--gsl.git
Click here to lend your support to: math--gsl and make a donation at www.pledgie.com !
math--gsl / examples / fft / forward_real
100755 12 lines (8 sloc) 0.242 kb
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl -w
 
use strict;
use Math::GSL::FFT qw/:all/;
use Math::GSL::Errno qw/:all/;
use Data::Dumper;
 
my $data = [ (0) x 5, (1) x 22, (0) x 5 ];
my ($status, $fft ) = gsl_fft_real_radix2_transform ($data, 1, 32);
print Dumper $fft;