#
# hop.rb

require "narray"
require "numru/advanceddcl"

include NumRu::AdvancedDCL
include NMath

nmax = 400
dt = 2*PI/(nmax-1)

x = NArray.sfloat(nmax)
y = NArray.sfloat(nmax)

for n in 0..nmax-1
  t = dt*n
  x[n] = 1e2*sin(4*t)
  y[n] = 1e-3*cos(5*t)+6
end

Dev.open
Frame.new

Axis.title('X-TITLE', 'x-unit', 'Y-TITLE', 'y-unit')
Axis.draw(x,y)
Plot.draw(x,y)

Dev.close
