Sha256: ae4adad7e0755335069d7902142211e766c78eb5ff02268fc99a8f842a1d93dc

Contents?: true

Size: 310 Bytes

Versions: 16

Compression:

Stored size: 310 Bytes

Contents

#!/usr/bin/env ruby
require("gsl") 

n = 128
data = GSL::Vector::Complex.alloc(n)

data[0] = 1.0
c = GSL::Complex[1, 0]
for i in 1..10 do
  data[i] = c
  data[n-i] = c
end

ffted = data.radix2_forward
ffted /= Math::sqrt(n)

GSL::graph(nil, data.re, ffted.re, "-T X -C -g 3 -L 'Radix-2' -x 0 #{data.size/2}")

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
rb-gsl-1.16.0.4 examples/fft/radix2.rb
rb-gsl-1.16.0.3 examples/fft/radix2.rb
rb-gsl-1.16.0.3.rc1 examples/fft/radix2.rb
gsl-nmatrix-1.15.3.2 examples/fft/radix2.rb
gsl-nmatrix-1.15.3.1 examples/fft/radix2.rb
rb-gsl-1.16.0.2 examples/fft/radix2.rb
rb-gsl-1.16.0.1 examples/fft/radix2.rb
rb-gsl-1.16.0 examples/fft/radix2.rb
rb-gsl-1.15.3.2 examples/fft/radix2.rb
rb-gsl-1.15.3.1 examples/fft/radix2.rb
blackwinter-gsl-1.15.3.2 examples/fft/radix2.rb
gsl-nmatrix-1.15.3.0 examples/fft/radix2.rb
gsl-1.15.3 examples/fft/radix2.rb
gsl-1.14.7 examples/fft/radix2.rb
gsl-1.14.6 examples/fft/radix2.rb
gsl-1.14.5 examples/fft/radix2.rb