% File: TABLE5_2.M

clear;

fprintf('\nThis file creates a list of J0(0,Beta) through Jn(n,Beta)');
fprintf('\nfor a specified value of Beta\n\n');

Beta = input('Enter the desired value of Beta: ');
n = input('Enter the desired value of n: ');

n = floor(n);
Jn = zeros(n,1);
m = zeros(n,1);
for (i = 0:1:n)
  Jn(i+1) = bessel(i,Beta);
  m(i+1) = i;
end;

% Storing results to a file
A = [m(:) Jn];

save table5_2.dat A /ascii
fprintf('table5_2.dat','\n\nThe previous columns correspond to:\n');
fprintf('table5_2.dat','n and Jn(n,Beta) for Beta = %g\n',Beta);
fprintf('\n\nThe output data has been stored in the file TABLE5_2.DAT\n');




