Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

old Fortran to new Matlab?

Status
Not open for further replies.

matclau

Electrical
Jan 9, 2005
1
0
0
DE
Hi There,
After inheriting an old fortran program (about 40 pages code) which has not been looked at for about 10 years I wonder what is best to implement changes. Is it worth translating to matlab or is it better to edit the old fortran code?
Perhaps I could find somebody to do the translating for me. It is important that the changed program can be run as exe without matlab license. I do not have much experience with either fortran nor matlab. But matlab is widely used within our group.
Many thanks for your thoughts!

matt
 
Replies continue below

Recommended for you

matclau,

By "old fortran" do you mean Fortran 77? If so, there are several commercially-available Fortran compilers that should be able to compile it, even if they are Fortran 90 or Fortran 95 compilers.

You can certainly find someone to edit it so that it conforms to Fortran 95 or even port it to Matlab. Really depends on how much time and money you can afford.

I have Matlab but am also looking at getting a Fortran compiler as I'm working on some problems where legacy Fortran code is already available.

You might also want to ask this question in the Fortran forum.

Good luck,

-MC
 
I recently did this with Fortran 77 code. There is a Matlab converter function that will convert from Fortran 90 to Maltab (I think it's called f2matlab) that I found on the web using Google. I ported the Fortran 77 to Fortran 90 with a Fortran 90 converter function (to_f90.f90) and a free Fortran IDE and compiler that I found on the web using Google, then from Fortran 90 to Matlab by calling the Matlab function.

I found it worked easiest if I deleted all of the comments from the original Frotran 77 program, and ran into a few difficulties, but I was eventually able to get it converted a lot faster than I expected. I was very pleased with the conversion.

Good luck!

xnuke
"Do you think you used enough dynamite there, Butch?"
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.
Back
Top