I have multiple Matlab versions installed on my PC. To say, R2006b, R2009b, R2010a. In this particular application I want to start R2009b when I start it from Shell. Is there any options at the time of startup to select which version to run?
Don't you simply specify the absolute path to the location of the version you want to run ?
To find which Matlab is started by default, type path
in the shell (opened by Run->cmd). The first one is the one that is picked if you type Matlab
.
From the output of path
you also find where your Matlab versions are located. If you don't want to navigate to the respective folder every time, you can make console aliases for the different versions.
EDIT
If you want to solve the problem in a very general sense, I see two possible avenues:
(1) Check the registry for whether Matlab puts something version-specific there that is tied to the path (or ask TheMathWorks).
(2) Parse path for '\bin\64' (or '\bin\32' if it's a 32-bit system) and check whether these folders contain a file called 'matlab'. As part of the installation routine (if the Matlab versions are not in the factory-default locations), start each Matlab, and run ver
to find which version it is.