Different results on different version Matlab

조회 수: 4 (최근 30일)
Xin Shen
Xin Shen 2019년 10월 31일
댓글: John D'Errico 2019년 10월 31일
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에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by