Code editing for older matlab version

11 次查看(过去 30 天)
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 个评论
Rik
Rik 2023-7-4
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.

请先登录,再进行评论。

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by