如何选择从shell或Matlab启动时启动哪个Matlab版本?
我的 PC 上安装了多个 Matlab 版本。也就是说,R2006b、R2009b、R2010a。 在此特定应用程序中,我希望在从 Shell 启动 R2009b 时启动它。 启动时有没有选项可以选择运行哪个版本?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要查找默认启动的 Matlab,请在 shell 中输入
path
(通过“运行”->“cmd”打开)。如果您输入Matlab
,就会选择第一个。从
path
的输出中,您还可以找到 Matlab 版本所在的位置。如果您不想每次都导航到相应的文件夹,可以将 不同版本的控制台别名。编辑
如果您想从一般意义上解决问题,我看到两种可能的途径:
(1)检查注册表以了解Matlab是否在其中放置了与路径相关的特定于版本的内容(或询问 TheMathWorks)。
(2) 解析“\bin\64”(如果是32位系统则为“\bin\32”)的路径,并检查这些文件夹是否包含名为“matlab”的文件。作为安装例程的一部分(如果 Matlab 版本不在出厂默认位置),启动每个 Matlab,然后运行
ver
来查找它的版本。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 typeMatlab
.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.难道您不简单地指定要运行的版本位置的绝对路径吗?
Don't you simply specify the absolute path to the location of the version you want to run ?