Which mldivide ('\') function is better
Ältere Kommentare anzeigen
Dear,
I have a 9x9 float matrix M, when I use it to \ function and got pretty much diferent result (P) between Matlab 2008 and 2015.
P = M \ eye(size(M))
My question is - Which one is better ? mldivide() in 2015 or mldivide() in 2008 Matlab version ? (suppose later is better ?)
Thanks,
--Dan
Akzeptierte Antwort
Weitere Antworten (2)
the cyclist
am 29 Nov. 2018
0 Stimmen
I highly doubt that a bug was found in mldivide later than 2008, so I doubt the later function is "more correct" or "more accurate". Instead, I suppose that there was some minor algorithmic change (e.g. some kind of time optimization).
How big is the difference between the two results? I'm guessing it is very small -- the order of normal floating point error -- such that the difference is down around the level of the overall accuracy of the calculation in the first place.
Can you upload the matrix M in a MAT file?
Dan NG
am 29 Nov. 2018
0 Stimmen
3 Kommentare
Walter Roberson
am 29 Nov. 2018
save -ascii -double and copy/paste that. It will not be bit-for-bit accurate (you need one more digit than is used by -ascii -double for bit-for-bit accuracy), but it should be enough for us to see 1E19 differences easily.
Walter Roberson
am 29 Nov. 2018
Differences that big suggest that either you are working with values near 1E-20 or else that your matrix is nearly singular.
Dan NG
am 3 Dez. 2018
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!