Neeta Dsouza answered . 2024-12-21 01:28:26
MATLAB R2018a introduced the ability to save App Designer applications to a previous release of MATLAB.
This functionality is similar to the "Export Model To > Previous Version" option in Simulink.
Generally, applications developed in a given release are expected to work in later releases as well. If any incompatibilities are introduced, the Code Compatibility Analyzer is a useful tool that you can use to identify potential compatibility issues in your existing code when you update MATLAB.
Running an app
You do not need to use the above functionality to run an app in an older version of MATLAB.
- If the newer app uses a new component or functionality that the older release does not yet support, there will be an error when trying to run it in the older release.
- However, if the newer app only uses features that are supported by the older MATLAB release, the app should be runnable in all prior releases of MATLAB without needing to perform the "Save Copy As".
A simple way to ensure compatibility when running is to create apps as web apps:
Web apps are created against one version of MATLAB and that version of MATLAB is on the server. End users can access Web Apps (including new features) regardless of which version of MATLAB they are running on their personal machine.
Editing an app
After saving a copy of an app to an older release, any incompatible functionality (components that do not exist in the previous release) will be removed from this copy when you open it in App Designer.
For example, if you create an app in R2017b that contains a "uitree" and save a copy as an R2017a app, the "uitree" will be removed when you open the R2017a version. This happens because releases prior to R2017b do not support "uitrees". However, if you create an app in R2018a that uses a menu and open it in R2017b, the menu would not be removed because "uimenu" is supported in R2017b.
Saving a copy of an app to R2016a is not in the list of "Save Copy As". It is still supported but requires a patch to be installed in order to work.
Performing "Save Copy As" to an older version is not an option when using R2023a Update 5 or before or R2023b Update 1. This is a known issue that was resolved in R2023a Update 6, R2023b Update 2, and is resolved in R2024a.
With Simulink
When using an app to interact with Simulink, it is important to ensure that both the App Designer and Simulink functionalities are supported on the releases being used. For example, if you are changing a specific property of a block, you will want to check that the property and the accessing function exist and are supported on all of the releases you are using. Then, you can place any necessary code changes that resolve incompatibilities into a callback function for an app component that is supported across all the releases (like a "uibutton"). Being careful about coding the app in this way should eliminate any incompatibilities between the releases.
There currently is no support for Web Apps to interact with previous versions of Simulink.
Not satisfied with the answer ?? ASK NOW