Olde Fortran vs Matlab

If you have never used your computer to solve home-made numerical simulations, you probably do not have any compiler installed. There are a few programming languages to choose from. Matlab and Fortran are probably the most widely used languages among civil engineers but they are quite different.

The old Fortran runs considerably faster than Matlab does. If you know that you will need a lot of computing power and that computing speed will be important, you may want to go with Fortran instead of Matlab. I chose Matlab for my master thesis and it was a nightmare. Another good advantage of Fortran is that if you use Linux you will find a lot of excellent compilers for free. Matlab is not cheap and there are a couple of free clones (Scilab and Octave) but the translation of the programs is not straightforward.

On the other hand, Matlab has a very easy to use interface and lots of libraries; it is possible to implement programs faster than with traditional programming languages and they are easy to read and to maintain (programs in Fortran are messy). After running your code, Matlab will graph the result for your variables. In Fortran you need extra routines to do this. In the absence of such routines, you will have to use a tedious spreadsheet to have anything to show.
Picture: Olde Fortran in Futurama. More images here.

What I cannot explain in this blog is why civil engineers still use Fortran and not C. Are we from the past?