如何从命令行运行Matlab?

编程入门 行业动态 更新时间:2024-10-27 11:23:03
本文介绍了如何从命令行运行Matlab?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以从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?

本文发布于:2023-11-13 21:54:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1585420.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:命令行   Matlab

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!