#
# quick1.rb
#   $Id: quick1.rb,v 1.2 2000/11/18 19:03:41 keiko Exp $
#

require "narray"
require "numru/dcl"

include NumRu
include Math

nmax = 50

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

#-- data ----
R    = 3.7
x[0] = 0.0
y[0] = 0.5

for n in 0..nmax-1
  x[n+1] = x[n] + 1.0
  y[n+1] = R*y[n]*(1.0-y[n])
end

#-- graph ----
iws = (ARGV[0] || (puts ' WORKSTATION ID (I)  ? ;'; DCL::sgpwsn; gets)).to_i
DCL::gropn iws
DCL::grfrm

DCL::usgrph(x, y)

DCL::grcls

