Is there a tool to check for compatibility between different MATLAB versions?

57 Ansichten (letzte 30 Tage)
Is there a tool to check for compatibility issues between the different MATLAB versions? Is there any way to check M scripts for compatibility issues between different MATLAB releases?
 

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 29 Mär. 2024 um 0:00
Bearbeitet: MathWorks Support Team am 29 Mär. 2024 um 10:18
For MATLAB R2017b and newer ONLY:
Yes, we do have a tool to create a 
codeCompatibilityReport 
for the current working folder and sub-folders. For more information, please look at the following link:
The code compatibility report opens in the MATLAB® Web Browser. After you upgrade to a newer version of MATLAB, you can use this report to identify potential compatibility issues in your existing code.
Within MATLAB, navigate to the directory hosting the '.m' files that you wish to run the code compatibility report for. 
Then, execute the following command:
>> codeCompatibilityReport
The code compatibility report contains information to help you upgrade your code to a new version of MATLAB. It contains the following sections.
  • Incompatibility and Syntax Errors—Table with details about syntax errors and incompatibility considerations in the analyzed code. For example, Using ~ to ignore a value is not permitted in this context or 'wavfinfo' has been removed. Use 'AUDIOINFO' instead. The table includes the following information.
  • Warnings and Other Recommendations—Table with details about warnings and other opportunities to improve your code. For example, "Programmatic use of DISPLAY is not recommended. Use DISP or FPRINTF instead." The table includes the following information.
  • Checks Performed—Details the checks performed on the specified code. It includes the following information.
  • Files—List of files that MATLAB analyzed for code compatibility.
For all releases of MATLAB up until MATLAB R2017a:
Unfortunately, there is no tool to directly check the compatibility of a script with a particular release of MATLAB. However, you can refer the MATLAB Release Notes, specify your desired release range, and select the Compatibility Considerations (Incompatibilities Only) filter for detailed information about the various compatibility considerations among different releases over that time span. The release notes can be found at the following link:
For example, you can select the release range from R2014b to R2017a and select the "Incompatibilities Only" filter under the "Compatibility Considerations" section. This will display the compatibility considerations from the release R2014b to R2017a. You can also look for any specific function or feature that you are concerned about the changes over the releases by entering it in the "Text Filter".
For all releases of MATLAB that are EARLIER than R2014b:
There is a tool for specifically transitioning to the new R2014b Graphics system. This is found at the following link:
  3 Kommentare
Walter Roberson
Walter Roberson am 12 Mär. 2023
Unfortunately, App Designer does not have good backwards compatibility. Mathworks keeps adding new capabilities to it, not just making it faster, and the newer versions do not always store the same information in the same place. Sometimes opening a newer app in an older version can work, but sometimes it just looks like it works at first but then in practice runs into problems -- and that can happen even if you did not use any new facilities introduced in-between the two versions.
DGM
DGM am 12 Mär. 2023
Not that it helps with the AppDesigner issue, but it's worth noting that the tools in the given answer seem to be meant for forward migration. The compatibility report generator doesn't check for cases where contemporary code might not run in an earlier release. For those cases, you're relying on PDF release notes, the documentation, and memory. In any case, it helps to have older versions installed if you actually want to be sure.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Desktop finden Sie in Help Center und File Exchange

Produkte


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by