Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Why is script execution way faster in 2015b than in next versions when computed several times ?

1 vue (au cours des 30 derniers jours)
Tristan Barjavel
Tristan Barjavel le 12 Sep 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi everyone,
I have an issue with a complex code that works only in R2015b (or previous versions I suppose). The code calls a complex script multiple times (thousands of times usually). In 2015b, when it is called a first time, it take approximatively 110sec and after, the time is really decreased and is less than 0.1sec.
However the same code in versions R2017, 2018 and 2019a the first time the script is called it is faster but after not only it doesn't get much faster over the next steps but it shows a memory error: " Out of memory. Type "help memory" for your options. "
The script is obtained from functions and syms operations, that's why it looks a bit messy. (It cannot be well implemented as a function, even though I tried and I had the same issue)
So my questions in the end would be:
Why are the next versions of Matlab not running the scripts the same way as previously ? (as if the script is stored and known in R2015b but not in the next versions ).
Is there a way to have the same execution process as in 2015b but with the matlab elements added of next versions (pause etc..)
Why is there a memory error appearing in R2017a to R2019a versions when the exact same code/variables and data are in the previous 2015b?
Thank you in advance for your help and answers, please don't hesitate to ask any questions if you're not sure about what I tried to explain.
(Please find the script in question attached, a similar one is experiencing the same issue ).
  7 commentaires
Tristan Barjavel
Tristan Barjavel le 17 Oct 2019
Thank you for your answer, it seems indeed to ne a possible reason, I will check in more details within the code and Verify If there is not such an issue. Thank you G.A !

Réponses (0)

Produits


Version

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by