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

6 次查看(过去 30 天)
Does the matlab version affect on your code's output ?

采纳的回答

Stephen23
Stephen23 2016-6-24
编辑:Stephen23 2016-7-4
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.

更多回答(1 个)

Andreas Goser
Andreas Goser 2016-6-24
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 个评论
Andreas Goser
Andreas Goser 2016-6-28
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 2016-6-28
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by