Code editing for older matlab version

49 views (last 30 days)
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 Comment
Rik
Rik on 4 Jul 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.

Sign in to comment.

Accepted Answer

Rik
Rik on 4 Jul 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).

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!