Is there any short method for upgradation of m-Script to newer version of MATLAB?

9 visualizzazioni (ultimi 30 giorni)
Hello, I want to upgrade some MATLAB scripts into latest version of MATLAB (Let say from 2010B to 2014B). Is there any method to do this automatically? As we know with every release there will be some instruction set modification.
  6 Commenti
Guillaume
Guillaume il 17 Mar 2017
Well as I said, the most breaking upgrade is actually to R2014b due to the major changes to HG2 in that version. While there has been some breaking changes in versions from 2014b to 2017a, it's less likely to impact the OP.
I'd be less scared of the jump from 2014b to 2017a than the jump to 2014b
sadanand Chandane
sadanand Chandane il 10 Apr 2017
Guys, Thanks for the Answers and Suggestion. Till now I have not found major issue, Since code is not related to plotting.
Thanks again

Accedi per commentare.

Risposta accettata

John D'Errico
John D'Errico il 17 Mar 2017
Nope. There is no automatic, magical way to ensure that some random old script is fully compatible. In general, they make every attempt to ensure compatibility. But sometimes they need to prune things away.
So I'd suggest you open the file in the editor. Look for any red mlint flags. (I.e., red horizontal lines on the right.) Fix them, one at a time.
Next, try to use the code as intended. Resolve any problems, one at a time. It won't take too long.

Più risposte (1)

Jan
Jan il 17 Mar 2017
2014b uses HG2 in opposite to 2010b's HG1. If the code assumes, that graphic handles are double values, it will fail. uitree has a different calling style and the resize behavior of figures have changed during they are opened. dataread was removed in 2016b already, and the change of strncmp(a,b,0) happend before 2016b also.
There are many pitfalls between Matlab versions. Most of them are tiny, but can affect your work. I did some tests for compatibility on larger codes (some 100'000 lines of code). Here only exhaustive unit-tests could reveal the problems: Each subfunction is called with a representative set of allowed inputs and teh results are compared with the expectations. In addition some invalid inputs are provided and the regular reaction is checked. Afterwards some integration tests checked the output of the whole program suite.
Writing unit-tests for each and every tiny or dumb function seems to be very tedious. Without such tests a migrating large codes cannot be performed reliably.
  1 Commento
sadanand Chandane
sadanand Chandane il 10 Apr 2017
Thanks Jan....Code is working without an Error but with an Unexpected Result. So now I have to deep dive into the code and check every function behavior...Specially MATLAB-toolbox functions.

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by