function [ n_data, x, fx ] = struve_l1_values ( n_data ) %*****************************************************************************80 % %% STRUVE_L1_VALUES returns some values of the Struve L1 function. % % Discussion: % % In Mathematica, the function can be evaluated by: % % StruveL[1,x] % % The data was reported by McLeod. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 19 September 2004 % % Author: % % John Burkardt % % Reference: % % Milton Abramowitz and Irene Stegun, % Handbook of Mathematical Functions, % US Department of Commerce, 1964. % % Allan McLeod, % Algorithm 757, MISCFUN: A software package to compute uncommon % special functions, % ACM Transactions on Mathematical Software, % Volume 22, Number 3, September 1996, pages 288-301. % % Stephen Wolfram, % The Mathematica Book, % Fourth Edition, % Wolfram Media / Cambridge University Press, 1999. % % Parameters: % % Input/output, integer N_DATA. The user sets N_DATA to 0 before the % first call. 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. % % Output, real X, the argument of the function. % % Output, real FX, the value of the function. % n_max = 20; fx_vec = [ ... 0.80950410749865126939E-06, ... 0.20724649092571514607E-03, ... 0.33191834066894516744E-02, ... 0.53942182623522663292E-01, ... 0.22676438105580863683E+00, ... 0.11027597873677158176E+01, ... 0.91692778117386847344E+01, ... 0.15541656652426660966E+03, ... 0.26703582852084829694E+04, ... 0.86505880175304633906E+06, ... 0.11026046613094942620E+07, ... 0.22846209494153934787E+07, ... 0.42454972750111979449E+08, ... 0.48869614587997695539E+09, ... 0.56578651292431051863E+10, ... 0.76853203893832108948E+12, ... 0.14707396163259352103E+17, ... 0.29030785901035567967E+21, ... 0.58447515883904682813E+25, ... 0.11929750788892311875E+30 ]; x_vec = [ ... 0.0019531250E+00, ... -0.0312500000E+00, ... 0.1250000000E+00, ... -0.5000000000E+00, ... 1.0000000000E+00, ... 2.0000000000E+00, ... -4.0000000000E+00, ... 7.0000000000E+00, ... -10.0000000000E+00, ... 16.0000000000E+00, ... 16.2500000000E+00, ... -17.0000000000E+00, ... 20.0000000000E+00, ... 22.5000000000E+00, ... -25.0000000000E+00, ... 30.0000000000E+00, ... -40.0000000000E+00, ... 50.0000000000E+00, ... 60.0000000000E+00, ... -70.0000000000E+00 ]; if ( n_data < 0 ) n_data = 0; end n_data = n_data + 1; if ( n_max < n_data ) n_data = 0; x = 0.0; fx = 0.0; else x = x_vec(n_data); fx = fx_vec(n_data); end return end