Sha256: f30dd3a974a6858d3c4def3969a92ed4895a00a442827e3bb17a1be1bf5d70eb

Contents?: true

Size: 390 Bytes

Versions: 22

Compression:

Stored size: 390 Bytes

Contents

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

x, y = Vector.filescan("points")

#spline = Spline.alloc(Interp::CSPLINE, n)
#spline.init(x, y)
#spline = Spline.alloc(x, y, "cspline")
#spline = Spline.alloc("cspline", x, y)
spline = Spline.alloc(x, y)

x2 = Vector.linspace(x[0], x[-1], 100)
y2 = spline.eval(x2)

graph([x, y], [x2, y2], "-C -g 3 -S 2")

#p spline.name
#p spline.min_size

Version data entries

22 entries across 22 versions & 4 rubygems

Version Path
gsl-2.1.0.3 examples/interp/spline.rb
gsl-2.1.0.2 examples/interp/spline.rb
gsl-2.1.0.1 examples/interp/spline.rb
gsl-2.1.0 examples/interp/spline.rb
gsl-1.16.0.6 examples/interp/spline.rb
rb-gsl-1.16.0.5 examples/interp/spline.rb
rb-gsl-1.16.0.4 examples/interp/spline.rb
rb-gsl-1.16.0.3 examples/interp/spline.rb
rb-gsl-1.16.0.3.rc1 examples/interp/spline.rb
gsl-nmatrix-1.15.3.2 examples/interp/spline.rb
gsl-nmatrix-1.15.3.1 examples/interp/spline.rb
rb-gsl-1.16.0.2 examples/interp/spline.rb
rb-gsl-1.16.0.1 examples/interp/spline.rb
rb-gsl-1.16.0 examples/interp/spline.rb
rb-gsl-1.15.3.2 examples/interp/spline.rb
rb-gsl-1.15.3.1 examples/interp/spline.rb
blackwinter-gsl-1.15.3.2 examples/interp/spline.rb
gsl-nmatrix-1.15.3.0 examples/interp/spline.rb
gsl-1.15.3 examples/interp/spline.rb
gsl-1.14.7 examples/interp/spline.rb