Matlab的dos command line使用


以前在看别人写的Multi-Camera Calibration的matlab code时,发现他配了一个cluster,通过ssh在每台电脑上都运行相同的matlab程序来处理获得的图片。其中matlab是这样调用的
>matlab -nosplash -nojvm func
-nojvm是unix下机子专用的,设置了该参数matlab的窗口就不会打开,感觉很爽。

在windows下,matlab的窗口是一定会打开的,但是也可以设置-minimize让其最小化,然后在.m文件最后加上exit,这样效果也还可以。
>matlab -nosplash -nodesktop -minimize -r myfunc -logfile C:\log.txt

Matlab Startup Options
http://www.mathworks.com/support/solutions/data/1-16B8X.html?solution=1-16B8X
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_env/f8-4994.html

Advertisement

2 thoughts on “Matlab的dos command line使用

  1. fli10 Post author

    Sometimes you want to return to windows command prompt or linux shell only after the program is done. In this case, you can add one more parameter, “-wait”, or “/wait”.

    You may also input some parameters for your own matlab script or function. You can try:
    matlab /r “x=2;myscript”
    or
    matlab /r “myfunc(2)”

    Reply
  2. BestRomeo

    I have noticed you don’t monetize fengl.org, don’t waste your traffic, you can earn additional cash every
    month with new monetization method. This is the best adsense alternative for any
    type of website (they approve all sites), for more info simply search in gooogle: murgrabia’s tools

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s