是否可以从Mac命令行运行Matlab命令?
Is it possible to run Matlab commands from Mac command line?
推荐答案matlab脚本位于MATLAB应用程序捆绑包的bin子目录中.在我的机器上,这意味着我可以像这样运行它:
The matlab script is in the bin subdirectory of the MATLAB app bundle. On my machine, this means I can run it like so:
/Applications/MATLAB_R2012a_Student.app/bin/matlab如果要在路径上使用此bin目录(以便仅运行matlab,mex等),请使用以下命令在主目录的顶层编辑或创建一个名为.bash_profile的新文本文件:以下行:
If you want this bin directory on your path (so that you can just run matlab, mex, etc), edit or create a new text file called .bash_profile in the top level of your home directory with the following line:
export PATH=/Applications/MATLAB_R2012a_Student.app/bin:$PATH将"MATLAB_R2012a_Student"部分替换为实际MATLAB应用程序包的名称.这对于当前打开的终端不会生效,但是新打开的终端应该可以正常工作.
Replacing the "MATLAB_R2012a_Student" part with the name of your actual MATLAB app bundle. This will not come into effect for currently open terminals, but newly opened terminals should work properly.
更多推荐
如何从命令行运行Matlab?
发布评论