Different results on different version Matlab

7 次查看(过去 30 天)
Greetings,
My deterministic program got different results on Matlab R2018a and R2019a.
Currently, I found it is very difficult to locate which functions or sentences cause this difference. Is there a good way to find these functions or sentences?
Thank you!
  2 个评论
Alex Mcaulley
Alex Mcaulley 2019-10-31
Probably, it will easier for us to see the code...
John D'Errico
John D'Errico 2019-10-31
Um, no.
First, we don't even know if your code really is deterministic. Some people think their code is, but under the hood, something uses a random start point, etc.
But even presuming the code really is deterministic, we don't know what your code is, so we cannot really help you.
If you want to know what may have caused the difference, then you need to look at the changes that happened between those releases. You can find this information in the release notes.
Even then, it is still possible that something changed. What? Your own code! I'd be wealthy if you gave me a dime for every new user of MATLAB who was actually not using the identically same code between releases. Or, perhaps they actually used different data, even though they thought the data was identical. (A common novice mistake, when someone copies out numbers from the command window, so only 4 or 5 significant digits, thinking that was exactly the data as it was used in the first call.) Or perhaps you modified actual MATLAB provided code, then when you upgraded to the new release, the modifications you made are now overwritten. People do many strange things, that we see. Sorry, but they do.
Again, you should start by looking at the release notes, but no, there is no way to just automatically get an indication of what is causing the difference, because there are so many reasons a difference could exist.

请先登录,再进行评论。

采纳的回答

YT
YT 2019-10-31
You could try to check the release notes and see if there are any functions you're using that may have changed.
And maybe checking the profile summary for any "significant" changes/differences between both versions is usefull:
runtime.JPG
which will display something like this:
profile_summary.JPG

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by