timstinnett
Programmer
Could SOmeone PLEASE convert this MATLAB COde to FORTRAN?? Much appreciated!
%% Lanczos' Approximation
z = [0.5:0.1:9.5];
for i = 1:length(z);
z(i) = z(i);
% Lanczos' Constants
p = [1.000000000190015;
76.18009172947146;
-86.50532032941677;
24.01409824083091;
-1.231739572450155;
(1.208650973866179).*(10.^-3);
(-5.395239384953).*(10.^-6)];
for n = 1:6;
a = (p(n+1)./(z(i)+n));
end
s = sum(a);
gamma_top(i) = ((sqrt(2.*pi())./z(i)).*(p(1) + s)).*((z(i)+5.5).^(z(i)+0.5)).*exp(-(z(i…
end
gamma = gamma_top'
%% Lanczos' Approximation
z = [0.5:0.1:9.5];
for i = 1:length(z);
z(i) = z(i);
% Lanczos' Constants
p = [1.000000000190015;
76.18009172947146;
-86.50532032941677;
24.01409824083091;
-1.231739572450155;
(1.208650973866179).*(10.^-3);
(-5.395239384953).*(10.^-6)];
for n = 1:6;
a = (p(n+1)./(z(i)+n));
end
s = sum(a);
gamma_top(i) = ((sqrt(2.*pi())./z(i)).*(p(1) + s)).*((z(i)+5.5).^(z(i)+0.5)).*exp(-(z(i…
end
gamma = gamma_top'