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)
version displays the version and release number for the currently running MATLAB®. v = version('- versionOption ') returns information for the specified option.
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 .
It is possible to have multiple MATLAB installations on the same computer. Be sure to install each version in a different directory.
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With