Why abandon Fortran for Linear Algebra?

Yes, Fortran Source MEX Files. The matlab2fmex tool I mentioned earlier translates Matlab code to Fortran so that the Fortran can be compiled to a MEX file. MathWorks would prefer that your code stays in Matlab:

MEX files are not appropriate for all applications. MATLAB is a high-productivity environment whose specialty is eliminating time-consuming, low-level programming in compiled languages like Fortran. In general, do your programming in MATLAB. Do not use MEX files unless your application requires it.

I remember that when a Matlab salesman visited my company in the late 1990s, he presented Matlab array operations and said that in Fortran you would have to write loops. That’s what the company had told him. There was an awkward silence when I interjected that Fortran 90 had array operations.

1 Like