MATLAB: What is the output from VER when called from a standalone application on a computer that does not have MATLAB installed

deployMATLABversion

I would like to know what VER returns from a standalone application on a machine without MATLAB installed.

Best Answer

This bug has been fixed in Release 2007b (R2007b). For previous product releases, read below for any possible workarounds:
Calling VER from a compiled application without an output argument will display information similar to calling VER from the command prompt in MATLAB. The MATLAB Version will coincide with the version of MATLAB that the MCR is from and the operating system will be the operating system of the machine running the application. For example, on a Windows XP machine it would look like the following:
-------------------------------------------------------------------------------------
MATLAB Version 7.0.4.365 (R14) Service Pack 2
MATLAB License Number: unknown
Operating System: Microsoft Windows XP Version 5.1 (Build 2600: Service Pack 2)
Java VM Version: Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
-------------------------------------------------------------------------------------
However, calling the functional form of VER, where the output is saved to a structure, will not return the same response in a stand-alone application on a machine that does not have MATLAB installed. To work around this issue, you may be able to use the string returned by the VERSION command in place of the VER structure. For example, on the same machine as previously described, the command:
a=version;
returns the string
a =
7.0.4.365 (R14) Service Pack 2
in MATLAB and in a stand-alone application.