Is there a way to see if my code (written in 2018b) will work in another, older version of Matlab, like 2015b?
7 views (last 30 days)
Show older comments
I wrote a bunch of code in my current version of matlab, R2018b, and when I gave it to the person I work for, he was unable to run it because he was running Matlab R2015b. Aside from the fact that, yes we should all probably be updating our Matlab when new releases come out, is there a way to check to see if my code will run with older versions of Matlab? I want to be able to check that before I distribute my code so that I can add support for older versions in case somebody hasn't updated it yet. I have looked at the checkCodeCompatability function, but that seems to check to see if old code runs on my CURRENT version of Matlab. This is a very different problem than the one I'm trying to solve. I want to know if my current code, will run on OLDER versions of Matlab.
0 Comments
Answers (3)
John D'Errico
on 15 Jan 2019
I'd suggest the simple way is to install the older release. You can have an older release active on your computer. So then you can test your code to verify it.
0 Comments
Rik
on 15 Jan 2019
The only foolproof way I have found is actually trying it.
You could also comb through the doc to check if the function behavior was changed for the functions you're using.
Another options is to look at the release notes to see if any function or functionality you're using was introduced in the interim. You should be aware that not all changes are included in the release notes.
1 Comment
Rik
on 15 Jan 2019
Also, for people stuck on a 32bit Windows machine, R2015b is actually the latest release that they can run.
Vaibhav Bamnote
on 23 Jun 2020
In matlab examples, there is a fixed brake caliper example where they have provided with this comand. I tried copying this command in MATLAB command window but it is showing as undefined variable or function in ouput. WHat can be the issue ?

3 Comments
Vaibhav Bamnote
on 23 Jun 2020
I tried running the error in MATLAB Window but its showing as undefined variable or function. I thought maybe its because of the different version so thats why asked it here.
Similar other commands are running but i am having this issue with this command only. Can you please help ?
Walter Roberson
on 23 Jun 2020
Either you do not have the relevant toolbox installed, or else you are using a version of MATLAB prior to when that example was introduced, or else you are using a version of MATLAB when that example had a different internal name.
SimDriveLine did not introduce brakes until R2019b.
See Also
Categories
Find more on Performance and Memory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!