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

m = Matrix.new(10, 10)
for i in 0...10
  for j in 0...10
    m.set(i, j, sin(i) + cos(j))
  end
end

for j in 0...10
  col = m.col(j)
  d = Blas.dnrm2(col)
  printf("matrix column %d, norm = %g\n", j, d)
end
