function [ n_data, k, fx ] = bessel_y0_zero_values ( n_data )

%*****************************************************************************80
%
%% bessel_y0_values() returns some zeros of the Y0 Bessel function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 March 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n_data: the user sets N_DATA to 0 before the first call.  
%    Thereafter, it should simply be the value returned by the previous call.
%
%  Output:
%
%    integer n_data: on each call, the routine increments N_DATA by 1, and
%    returns the corresponding data; when there is no more data, the
%    output value of N_DATA will be 0 again.
%
%    integer k: the index of the zero.
%
%    real fx: the value of the function.
%
  n_max = 32;

  fx_vec = [ ...
  0.8935769662791675, ...
  3.957678419314858, ...
  7.086051060301773, ...
  10.22234504349642, ...
  13.36109747387276, ...
  16.50092244152809, ...
  19.64130970088794, ...
  22.78202804729156, ...
  25.92295765318092, ...
  29.06403025272840, ...
  32.20520411649328, ...
  35.34645230521432, ...
  38.48775665308154, ...
  41.62910446621381, ...
  44.77048660722199, ...
  47.91189633151648, ...
  51.05332855236236, ...
  54.19477936108705, ...
  57.33624570476628, ...
  60.47772516422348, ...
  63.61921579772038, ...
  66.76071602872964, ...
  69.90222456393850, ...
  73.04374033239207, ...
  76.18526243968061, ...
  79.32679013300400, ...
  82.46832277421550, ...
  85.60985981879671, ...
  88.75140079929514, ...
  91.89294531215718, ...
  95.03449300717121, ...
  98.17604357893667 ];

  k_vec = [ ...
     1, ...
     2, ...
     3, ...
     4, ...
     5, ...
     6, ...
     7, ...
     8, ...
     9, ...
    10, ...
    11, ...
    12, ...
    13, ...
    14, ...
    15, ...
    16, ...
    17, ...
    18, ...
    19, ...
    20, ...
    21, ...
    22, ...
    23, ...
    24, ...
    25, ...
    26, ...
    27, ...
    28, ...
    29, ...
    30, ...
    31, ...
    32  ];

  if ( n_data < 0 )
    n_data = 0;
  end

  n_data = n_data + 1;

  if ( n_max < n_data )
    n_data = 0;
    k = 0;
    fx = 0.0;
  else
    k = k_vec(n_data);
    fx = fx_vec(n_data);
  end

  return
end

