Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please CONVERT THIS TO FORTRAN!!

Status
Not open for further replies.

timstinnett

Programmer
Dec 1, 2012
1
US
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(n) = (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'
 
timstinnett said:
Could SOmeone PLEASE convert this MATLAB COde to FORTRAN??
And why don't you try to do it yourself?
 
I really like to help people with their problems they have in doing fortran.
But I do not like being considered a software-on-demand provider.

Norbert


The optimist believes we live in the best of all possible worlds - the pessimist fears this might be true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top