Migrate code from R2011a to R2015b - Legacy flag for Set functions

2 ビュー (過去 30 日間)
Siusen Phang
Siusen Phang 2016 年 12 月 9 日
コメント済み: TecBen 2019 年 12 月 4 日
I'm migrating existing Matlab code that used to run in R2011a to a newer version R2015b. There's a situation with the Set functions intersect, ismember, setdiff, setxor, union, and unique. According to the Matlab release notes these functions changed their behavior in R2012a and in order to maintain their legacy behavior I need to add a legacy flag to the function call (e.g. ismember(a,b,'legacy'). My existing code has thousands of calls to the Set functions so doing this manually is starting to look as a very difficult task to do and very prompt to human error.
Did Mathworks create some kind of tool to support users migrate old code but maintain their legacy behavior? In other works, is there an automated way, supported by Mathworks, to attach this legacy flag to the set functions?

採用された回答

Siusen Phang
Siusen Phang 2016 年 12 月 13 日
To anyone else looking for a solution to this, Mathworks has a tool to support the migration of old calls to Set functions, the tool locates the calls to Set functions within .m files and lets you define if you want to add a "legacy" or a "R2012a" flag to the call. The tool is executed through the function legacysetfuns.m, just ask for it to the technical support team.

その他の回答 (2 件)

John D'Errico
John D'Errico 2016 年 12 月 9 日
No
  1 件のコメント
Siusen Phang
Siusen Phang 2016 年 12 月 9 日
Hi John Well lucky for me Mathwork did create a tool for this which was sent to me after I created a technical support ticket.
To anyone else looking for this tool, it is a Matlab function called legacysetfuns.m, just ask for it to the technical support team.

サインインしてコメントする。


Vikaasa Kumar
Vikaasa Kumar 2017 年 12 月 27 日
Please direct all requests regarding this thread to MathWorks Technical Support.
You can submit a new Technical Support Request here: http://www.mathworks.com/support/servicerequests/create.html
  1 件のコメント
TecBen
TecBen 2019 年 12 月 4 日
When you create a Technical Support Request ask for Article Number.: 000009444

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by