Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I know which minimum MATLAB version is required to run a script/function?

Tags:

matlab

I have written a MATLAB script/function: How can I know which minimum MATLAB version is required to run it? (without having to run it on different MATLAB versions)

like image 862
Franck Dernoncourt Avatar asked Jan 30 '14 15:01

Franck Dernoncourt


People also ask

How do I check MATLAB script version?

version displays the version and release number for the currently running MATLAB®. v = version('- versionOption ') returns information for the specified option.

How do you find the minima of a function in MATLAB?

x = fminbnd( problem ) finds the minimum for problem , where problem is a structure. [ x , fval ] = fminbnd(___) , for any input arguments, returns the value of the objective function computed in fun at the solution x .

Can I run two MATLAB versions at the same time?

It is possible to have multiple MATLAB installations on the same computer. Be sure to install each version in a different directory.


1 Answers

If you have recently written it, hopefully the code is still fresh in your mind.

In this case I would recommend grabbing the release notes, and start reading backwards untill you find a new feature that you used.

For most of my code fragments the backwards compatibility stops at the point where ~ is not allowed as output, where sort only has one possible output argument. Or where rng did not exist yet. I would look into at least these points as they are quite significant changes.


If you are not willing to try a lot of runs for different versions: Just make a guess. If it runs on an old version, and on a new version, it is very likely that it will also run on all versions in between. If it is a one time question and the code is simple to run, but you just don't want to get an old matlab version, you could consider contacting Mathworks support and ask them to try it.

Sidenote: If you are only worried about the validity of the syntax, it may be sufficient do dig up old mlint versions rather than full installations?

like image 73
Dennis Jaheruddin Avatar answered Sep 29 '22 11:09

Dennis Jaheruddin