MATLAB: Cond result very different on different compute

Architecturecond

I have a large matrix A (about 7000×7000). On one computer, a windows PC running MATLAB 2015b, cond(full(A)) gives me 18.5. On a CentOS server running MATLAB 2016a, however, the same command gives about 1.2e+6. What could explain this large difference? Which one is (more) correct?

Best Answer

The two are using different versions of LINPACK or LAPACK. The PC is almost certainly using MKL (Intel's Math Kernel Library), but I do not know if the Linux one would be. If you were to use a later version of MATLAB on the PC, R2016b I think it was, a later version of MKL was used, leading to a lot of subtle differences when the matrices are near singular.
I would suspect, given the behaviour you describe, that the cond() is high (badly conditioned.)