function [ x, y ] = p09_dat ( data_num )

%*****************************************************************************80
%
%% p09_dat() returns the data vector for problem 9.
%
%  Discussion:
%
%    This example is due to Max Waldmeier.
%
%    This data represents a measure of sunspot activity over the
%    years 1700 to 1960.  The X value is the year, and the Y value
%    is a measure of the sunspot activity, which is usually, but
%    not always, an integer.
%
%    The X data is equally spaced.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 August 2011
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Max Waldmeier,
%    The Sunspot-Activity in the Years 1610-1960,
%    Shulthess, Zurich, 1961.
%
%  Input:
%
%    integer DATA_NUM, the number of data points.
%
%  Output:
%
%    real X(DATA_NUM,1), the abscissa data.
%
%    real Y(DATA_NUM,1), the ordinate data.
%
  x(1:261,1) = ( 1700 : 1960 )';

  y(1:261,1) = [ ...
    5.0,  11.0,  16.0,  23.0,  36.0, ...
   58.0,  29.0,  20.0,  10.0,   8.0, ...
    3.0,   0.0,   0.0,   2.0,  11.0, ...
   27.0,  47.0,  63.0,  60.0,  39.0, ...
   28.0,  26.0,  22.0,  11.0,  21.0, ...
   40.0,  78.0, 122.0, 103.0,  73.0, ...
   47.0,  35.0,  11.0,   5.0,  16.0, ...
   34.0,  70.0,  81.0, 111.0, 101.0, ...
   73.0,  40.0,  20.0,  16.0,   5.0, ...
   11.0,  22.0,  40.0,  60.0,  80.9, ...
   83.4,  47.7,  47.8,  30.7,  12.2, ...
    9.6,  10.2,  32.4,  47.6,  54.0, ...
   62.9,  85.9,  61.2,  45.1,  36.4, ...
   20.9,  11.4,  37.8,  69.8, 106.1, ...
  100.8,  81.6,  66.5,  34.8,  30.6, ...
    7.0,  19.8,  92.5, 154.4, 125.9, ...
   84.8,  68.1,  38.5,  22.8,  10.2, ...
   24.1,  82.9, 132.0, 130.9, 118.1, ...
   89.9,  66.6,  60.0,  46.9,  41.0, ...
   21.3,  16.0,   6.4,   4.1,   6.8, ...
   14.5,  34.0,  45.0,  43.1,  47.5, ...
   42.2,  28.1,  10.1,   8.1,   2.5, ...
    0.0,   1.4,   5.0,  12.2,  13.9, ...
   35.4,  45.8,  41.1,  30.1,  23.9, ...
   15.6,   6.6,   4.0,   1.8,   8.5, ...
   16.6,  36.3,  49.6,  64.2,  67.0, ...
   70.9,  47.8,  27.5,   8.5,  13.2, ...
   56.9, 121.5, 138.3, 103.2,  85.7, ...
   64.6,  36.7,  24.2,  10.7,  15.0, ...
   40.1,  61.5,  98.5, 124.7,  96.3, ...
   66.6,  64.5,  54.1,  39.0,  20.6, ...
    6.7,   4.3,  22.7,  54.8,  93.8, ...
   95.8,  77.2,  59.1,  44.0,  47.0, ...
   30.5,  16.3,   7.3,  37.6,  74.0, ...
  139.0, 111.2, 101.6,  66.2,  44.7, ...
   17.0,  11.3,  12.4,   3.4,   6.0, ...
   32.3,  54.3,  59.7,  63.7,  63.5, ...
   52.2,  25.4,  13.1,   6.8,   6.3, ...
    7.1,  35.6,  73.0,  85.1,  78.0, ...
   64.0,  41.8,  26.2,  26.7,  12.1, ...
    9.5,   2.7,   5.0,  24.4,  42.0, ...
   63.5,  53.8,  62.0,  48.5,  43.9, ...
   18.6,   5.7,   3.6,   1.4,   9.6, ...
   47.4,  57.1, 103.9,  80.6,  63.6, ...
   37.6,  26.1,  14.2,   5.8,  16.7, ...
   44.3,  63.9,  69.0,  77.8,  64.9, ...
   35.7,  21.2,  11.1,   5.7,   8.7, ...
   36.1,  79.7, 114.4, 109.6,  88.8, ...
   67.8,  47.5,  30.6,  16.3,   9.6, ...
   33.2,  92.6, 151.6, 136.3, 134.7, ...
   83.9,  69.4,  31.5,  13.9,   4.4, ...
   38.0, 141.7, 190.2, 184.8, 159.0, ...
  112.3 ]';

  return
end
