在哪里放一个批处理程序与matlab一起使用?

时间:2017-06-14 15:14:06

标签: bash matlab

(Ubuntu 16.04) 有人给了我一个批处理文件来在命令行中使用程序。所以我将它放在一个文件夹中并创建一个别名,以便能够在任何地方使用它(并且它可以工作)。

但是现在,我想从Matlab运行这个程序。所以我试过

system('bhsim command line');

并获得此错误:

/bin/bash: bhsim : commande introuvable

bhsim是我想要运行的程序的名称。

2 个答案:

答案 0 :(得分:0)

看起来像PATH环境变量问题。

尝试提供完整路径

system('/path/bhsim command line');

答案 1 :(得分:0)

There is (at least) to solution :

The first is giving the full path (skr's answer)

system('/path/bhsim command line');

The second is : add the path to $PATH. On Ubuntu :

(in the terminal)

export PATH=$PATH:/path/to/bhsim/

and then you can use

system('bhsim command line');