Different svd results with R2015b and R2016a
2 views (last 30 days)
Show older comments
I'm trying to figure out why I'm seeing different results with the same code for R2015b and R2016a on Windows and Linux. Mac 2015b and R2016a match R2015b on Windows and Linux. Windows and Linux R2016a results match.
Any ideas on where to look to figure out why I'm getting different results?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165176/image.png)
>> ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 8.6.0.267246 (R2015b)
MATLAB License Number: XXXXXXX
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 10586)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 8.6 (R2015b)
Database Toolbox Version 6.0 (R2015b)
MATLAB Compiler Version 6.1 (R2015b)
Optimization Toolbox Version 7.3 (R2015b)
Parallel Computing Toolbox Version 6.7 (R2015b)
Statistics and Machine Learning Toolbox Version 10.1 (R2015b)
>> ver
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.0.0.341360 (R2016a)
MATLAB License Number: XXXXXXX
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 10586)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.0 (R2016a)
Database Toolbox Version 6.1 (R2016a)
MATLAB Compiler Version 6.2 (R2016a)
Optimization Toolbox Version 7.4 (R2016a)
Parallel Computing Toolbox Version 6.8 (R2016a)
Statistics and Machine Learning Toolbox Version 10.2 (R2016a)
6 Comments
Christine Tobler
on 27 May 2016
Both results are correct up to machine precision. The reason for the difference between MATLAB versions is that the MKL library (containing the BLAS and LAPACK libraries which are used for the linear algebra computations) has been updated between releases.
To check the version of the MKL used in MATLAB, type
>> version -blas
The reason that the results changed is likely due to a difference in the order of operations. This will affect the results in small ways, without there necessarily being a better or worse result. Such small changes are likely to happen between any two MATLAB versions, as the MKL version is updated regularly.
Answers (0)
See Also
Categories
Find more on External Language Interfaces in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!