Code editing for older matlab version

조회 수: 11 (최근 30일)
Andrey Melnikov
Andrey Melnikov 2023년 7월 4일
댓글: Rik 2023년 7월 4일
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