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

%*****************************************************************************80
%
%% bessel_y1_values() returns some zeros of the Y1 Bessel function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 June 2025
%
%  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 = 30;

  fx_vec = [ ...
     2.197141326031017, ...
     5.429681040794135, ...
     8.596005868331169, ...
    11.74915483083988, ...
    14.89744212833673, ...
    18.04340227672786, ...
    21.18806893414221, ...
    24.33194257135691, ...
    27.47529498044922, ...
    30.61828649164111, ...
    33.76101779610933, ...
    36.90355531614295, ...
    40.04594464026688, ...
    43.18821809739321, ...
    46.33039925070169, ...
    49.47250567992410, ...
    52.61455076717296, ...
    55.75654487920813, ...
    58.89849617143305, ...
    62.04041114767069, ...
    65.18229505809561, ...
    68.32415218740330, ...
    71.46598606698612, ...
    74.60779963351172, ...
    77.74959534906120, ...
    80.89137529327611, ...
    84.03314123483830, ...
    87.17489468749572, ...
    90.31663695439648, ...
    93.45836916348223 ]; 

  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 ];

  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

