Skip to content

Commit

Permalink
Adding basic FFT example
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Oct 12, 2008
1 parent c3c1d2c commit 9b02726
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -6,6 +6,7 @@
- Improved Deriv, Integration, Chebyshev, Combination and Roots docs
- Improved introduction examples in Math::GSL
- Improved Minimization subsystem tests, but it is not functional
- Added examples/fft/forward_real
- Added example/deriv/basic

This shows the simple fact that d/dx(sin(x)) = cos(x)
Expand Down
11 changes: 11 additions & 0 deletions examples/fft/forward_real
@@ -0,0 +1,11 @@
#!/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;

0 comments on commit 9b02726

Please sign in to comment.