首页 > 解决方案 > R 找不到 MATLAB 运行时

问题描述

我制作了一个 R 脚本,它生成一个命令行,该命令行应该启动一个带有参数的 MATLAB“.exe”文件。

生成的命令行如下所示:

cmd = "X:\matlabscript.exe [xxx,xxx,...]"

然后我在shell中输入命令:

shell(cmd)

我得到这个错误:

Error: Could not find version 9.7 of the MATLAB Runtime. 
Attempting to load mclmcrrt9_7.dll.
Please install the correct version of the MATLAB Runtime.
Contact your vendor if you do not have an installer for the MATLAB Runtime.
Warning message:
In shell(cmd) :
  l'exécution de 'X:\matlabscript.exe [xxx,xxx,...]' a échoué avec le code d'erreur 65535

当我在 CMD.exe 中复制粘贴命令时,它工作正常。

我还在系统环境变量“路径”中添加了运行时路径,但它没有改变任何东西。

如何通过 R 启动 MATLAB 运行时?

标签: rmatlabcmd

解决方案


问题解决了...

我不得不重新启动计算机,因为仅重新启动 R 会话是不够的。

现在工作正常!


推荐阅读