Mathematica中文论坛-非官方

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 7600|回复: 0
打印 上一主题 下一主题

豆粑粑 matlab 文字命令 text mode

[复制链接]

550

主题

629

帖子

3181

积分

论坛元老

Rank: 8Rank: 8

积分
3181
跳转到指定楼层
楼主
发表于 2016-8-20 10:27:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
转的
https://linuxinfo.physik.hu-berlin.de/matlab.html




From the command line:

matlabgraphical interface
matlab -nodesktop -nosplashtext mode, with graphics window
matlab -nodisplaytext mode, without graphics
(if /usr/global/matlab/bin is in PATH).


Running Matlab from scriptsIn order to run Matlab code from a script, prepare a file with extension .m and run it with the switch "-r".
Examples:      matlab -r  myscript           # run myscript.m      matlab -r "myfct(2,3)"        # run myfct.m with argumentsIn non-interactive mode (e.g. from a batch script), you may have to extend PATH and set MATLABPATH first. In addition, the graphical interface and plot window are to be suppressed.
Example:      PATH=/usr/global/matlab/binPATH      MATLABPATH=$HOME/my_matlab_dir      export MATLABPATH      matlab -nodisplay -r "myscript, quit"     # run myscript.m and quitThe trailing "quit" makes sure that Matlab is terminated, even if this was omitted from the script.
Plots are generated as usual, but will not be displayed. The most recent one can be stored as a file by a Matlab statement like      saveas(gcf,'filename.ext')          % format according to extension      saveas(gcf,'filename.eps','psc2')   % EPS with colorValid extensions are .fig (Matlab's format), .eps, .jpg, .png and others (but no PDF).

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Mathematica中文论坛-非官方 ( 辽ICP备16001491号-1

GMT+8, 2024-12-29 23:11 , Processed in 0.103886 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表