Code editing for older matlab version

50 vues (au cours des 30 derniers jours)
Andrey Melnikov
Andrey Melnikov le 4 Juil 2023
Commenté : Rik le 4 Juil 2023
I completed the project in matlab 2022, now it became necessary to launch this project in matlab 2014, of course the project did not work. I don't want to install an older version. Is it possible to edit the code which made in version 2022 to work in older versions of matlab, something like "compatibility mode"?
  1 commentaire
Rik
Rik le 4 Juil 2023
Just a note: if you received an answer, you should either comment why it didn't solve your question, or mark it as accepted answer. If there are multiple answers, pick the best one and give the other(s) an upvote.

Connectez-vous pour commenter.

Réponse acceptée

Rik
Rik le 4 Juil 2023
The short answer is: yes and no.
The medium length answer will not make you happy either:
You can use the R2022b editor to write code for R2014a, but there are no automatic methods to ensure code will run on older versions. There are sometimes hints in the release notes, but not all changes are included.
I personally create tester functions for my functions. That way I can ensure compatibility with Matlab versions as far back as R13 (v6.5), and with GNU Octave (starting from version 4).
You might want to have a look at my file exchange submissions. That might give you an idea about what it takes to provide such a broad compatibility range. If you just want to support R2014a, there will be a lot less hassle. But again, short of running the code on R2014a there is no way to automatically tell whether it works as expected. So you will have to install it somewhere (if you want to keep your OS clean, you could consider a virtual machine).

Plus de réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by