Sha256: c4fcc123e69f10fdffa432b471acf66525b618401ca50714cff5c54be211a095
Contents?: true
Size: 512 Bytes
Versions: 16
Compression:
Stored size: 512 Bytes
Contents
#!/usr/bin/env ruby # Usage from command line: # % gsl-randist 0 10000 cauchy 30 | ./hist1d.rb -100 100 200 require("gsl") if ARGV.size != 3 puts("Usage: gsl-histogram xmin xmax n") puts(" Computes a histogram of the data") puts(" on stdin using n bins from xmin to xmax") end a = ARGV.shift.to_f b = ARGV.shift.to_f n = ARGV.shift.to_i h = GSL::Histogram.alloc(n, a, b) while line = STDIN.gets x = line.chomp.to_f h.increment(x) end h.graph("-C -g 3 -L 'gsl-randist 0 10000 cauchy 30'")
Version data entries
16 entries across 16 versions & 4 rubygems