I have several scripts (m Files) and our customers have different Matlab versions. Is there a tool to check for compatiblity of each script with certain Matlab versions?
I have several scripts (m Files) and our customers have different Matlab versions. Is there a tool to check for compatiblity of each script with certain Matlab versions?
For MATLAB R2017b and newer ONLY:
Yes, we do have a tool to create a codeCompatibilityReport for the current working folder and subfolders. This feature was introduced in MATLAB R2017b. 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.
Navigate to the directory hosting your M files that you wish to run the code compatibility report for, within MATLAB. 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 these 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."
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."
Checks Performed — Details the checks performed on the specified code.
Files — List of files that MATLAB analyzed for code compatibility.
Here is a link to the MATLAB Answers Post with more information: https://www.mathworks.com/matlabcentral/answers/364764-is-there-a-tool-to-check-for-compatibility-between-different-matlab-versions