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


require "narray"
require "numru/dcl"
include NumRu
include Math


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

#-- data ---
x.indgen(1950.0, 1.0) 
r    = 3.7
y[0] = 0.5
for n in 0..nmax-1
  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::ussttl('TIME', 'YEAR', 'HEAT FLUX', 'W/m|2"')
DCL::usgrph(x, y)

DCL::grcls

