Does the matlab version affect on your code's output ?

6 Ansichten (letzte 30 Tage)
riddhi desai
riddhi desai am 24 Jun. 2016
Bearbeitet: Stephen23 am 4 Jul. 2016
Does the matlab version affect on your code's output ?

Akzeptierte Antwort

Stephen23
Stephen23 am 24 Jun. 2016
Bearbeitet: Stephen23 am 4 Jul. 2016
Yes.
  • Some MATLAB versions changed the order of results (for an example see unique, setdiff, etc, and search for "legacy").
  • Functions get rewritten to accept different inputs, which means the outputs may also change (see example).
  • Bugs get fixed, which may change the output.
  • Changes to the underlying algorithms also occur, which can change numeric results at the lowest precision digits (see example). Christine Tobler (who works for TMW (which makes MATLAB)), said "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". So even TMW say that changes happen between MATLAB versions.
  • LAPACK and other supporting libraries can change the outputs. For example qr changed dramatically (although mathematically equally correct) between LAPACK versions, and hence between MATLAB versions as well, as explained here.

Weitere Antworten (1)

Andreas Goser
Andreas Goser am 24 Jun. 2016
It rarely does. Mostly it is not the release, but you also changed from 32 to 64 bit at the same time. This is an entirely differnt topic though. Sometimes, default options for some functions change. I e.g. recall something in Optimization Toolbox a couple of years ago.
If you suspect a bug, please get in touch with Technical Support.
  3 Kommentare
Andreas Goser
Andreas Goser am 28 Jun. 2016
This background information is not enough. My answer remains unchanged. You should provide all code and data needed to technical support.
Walter Roberson
Walter Roberson am 28 Jun. 2016
As Stephen correctly indicated, there are a number of reasons why output can be different. The output is not usually very different, but it can happen, as there are some algorithms that are very sensitive to numeric round-off. Also, some MATLAB functions change default settings.
Some aspects of the random number generator system changed in R2013a and so could potentially have made a difference between R2012* and R2014*.
I would not suggest going to technical support with this quite yet; I suggest posting the code here, as people here might be able to point out reasons the output might have changed.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by