Is there any short method for upgradation of m-Script to newer version of MATLAB?
9 ビュー (過去 30 日間)
古いコメントを表示
sadanand Chandane
2017 年 3 月 17 日
コメント済み: sadanand Chandane
2017 年 4 月 10 日
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 件のコメント
Guillaume
2017 年 3 月 17 日
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
採用された回答
John D'Errico
2017 年 3 月 17 日
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.
0 件のコメント
その他の回答 (1 件)
Jan
2017 年 3 月 17 日
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.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!