Is there a way to get the version of MATLAB without launching the engine? When launched (in non-GUI mode) it prints the version to stout – but I am using it remotely from Java and so that output is not available.
As an alternative, is there a way to get the version from within MATLAB?
By ‘version’ I mean preferably the double-string number, e.g “7.13” as opposed to the release number e.g “R2011b”.
Thanks!
James
As Jonas said, the
versioncommand is your friend. Useto get the numeric version (followed by the “R-release” version) in a string, as follows:
Then, you should be able to parse the string to get just the beginning numeric part.
See the MathWorks documentation for VERSION at
http://www.mathworks.com/help/techdoc/ref/version.html
for more information.
An additional hint; if you’re looking for the version number to ensure that the installed MATLAB is no older than (some particular release number), check out the documentation for VERLESSTHAN, at http://www.mathworks.com/help/techdoc/ref/verlessthan.html It might help you solve your problem without having to parse the string yourself.