Hi Maria,
I understand that you are trying to compute the inverse of a singular matrix. A matrix is singular when it has no inverse.
When you try to compute the inverse of a singular matrix, it gives different values in different versions of MATLAB. This occurs due to the different Math Kernel Library(MKL) used in different versions of MATLAB. MathWorks update the MKL in new MATLAB releases. The result of matrix operations may be slightly different on different releases of MATLAB.
Please refer the link below to know more about inv function.
Thanks,
Vishnu Kuruppath