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

n = 128
data = Vector.new(n)

data[0] = 1.0
for i in 1..10 do
  data[i] = 1.0
  data[n-i] = 1.0
end

datasave = data.clone

#data.radix2_transform()
#FFT::Real.radix2_transform(data)
FFT::Real::Radix2.transform(data)
data /= Math::sqrt(n)
graph(nil, datasave, data, "-T X -C -g 3 -L 'Real Radix-2' -x 0 #{data.size}")
