Permalink
Browse files

Adding basic FFT example

  • Loading branch information...
1 parent c3c1d2c commit 9b0272614837d45c6ea4d05553d500f4f188b130 @leto committed Oct 12, 2008
Showing with 12 additions and 0 deletions.
  1. +1 −0 Changes
  2. +11 −0 examples/fft/forward_real
View
@@ -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)
View
@@ -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.