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


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


nmax = 50
xmin = 1950
xmax = 2000
y = NArray.sfloat(nmax+1)

#-- data ---
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

rundef = DCL::glrget('RUNDEF')
DCL::grswnd(xmin, xmax, rundef, rundef)
DCL::ussttl('TIME', 'YEAR', 'HEAT FLUX', 'W/m|2"')
DCL::usgrph(rundef, y)

DCL::grcls

