Matlab:从命令行运行 m 文件 [英] Matlab: Running an m-file from command-line
本文介绍了Matlab:从命令行运行 m 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设;
我在以下位置有一个 m 文件:C:M1M2M3mfile.m
I have an m-file at location:
C:M1M2M3mfile.m
matlab的exe文件在这个位置:C:E1E2E3matlab.exe
And exe file of the matlab is at this location:
C:E1E2E3matlab.exe
我想用 Matlab 从命令行运行这个 m 文件,例如在 .bat 文件中.我该怎么做,有没有办法做到这一点?
I want to run this m-file with Matlab, from command-line, for example inside a .bat file. How can I do this, is there a way to do it?
推荐答案
这样的命令可以成功运行 m 文件:
A command like this runs the m-file successfully:
C:<这里的长路径>matlab.exe"-nodisplay -nosplash -nodesktop -r "run('C:<这里的长路径>mfile.m');退出;"
这篇关于Matlab:从命令行运行 m 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文