linux下运行matlab的.m文件
在Linux下安装完matlab后,会在/usr/local/bin/下生成matlab文件,可以使用matlab命令。
Usage: matlab [-h|-help] | [-n | -e]
[-arch | v=variant | v=arch/variant]
[-c licensefile] [-display Xdisplay | -nodisplay]
[-nosplash] [-mwvisual visualid] [-debug] [-softwareopengl]
[-desktop | -nodesktop | -nojvm]
[-r MATLAB_command] [-logfile log]
[-Ddebugger [options]]
-h|-help - Display arguments.
-n - Display final environment variables,
arguments, and other diagnostic
information. MATLAB is not run.
-e - Display ALL the environment variables and
their values to standard output. MATLAB
is not run. If the exit status is not
0 on return then the variables and values
may not be correct.
-arch - Start MATLAB assuming architecture arch.
v=variant - Start the version of MATLAB found
in bin/glnxa64/variant instead of bin/glnxa64.
v=arch/variant - Start the version of MATLAB found
in bin/arch/variant instead of bin/glnxa64.
-c licensefile - Set location of the license file that MATLAB
should use. It can have the form port@host or
be a colon separated list of license files.
The LM_LICENSE_FILE and MLM_LICENSE_FILE
environment variables will be ignored.
-display Xdisplay - Send X commands to X server display, Xdisplay.
-nodisplay - Do not display any X commands. The MATLAB
desktop will not be started. However, unless
-nojvm is also provided the Java virtual machine
will be started.
-nosplash - Do not display the splash screen during startup.
-mwvisual visualid - The default X visual to use for figure windows.
-debug - Provide debugging information especially for X
based problems.
-desktop - Allow the MATLAB desktop to be started by a
process without a controlling terminal. This is
usually a required command line argument when
attempting to start MATLAB from a window manager
menu or desktop icon.
-nodesktop - Do not start the MATLAB desktop. Use the current
terminal for commands. The Java virtual machine
will be started.
-singleCompThread - Limit MATLAB to a single computational thread.
By default, MATLAB makes use of the multithreading
capabilities of the computer on which it is running.
-nojvm - Shut off all Java support by not starting the
Java virtual machine. In particular the MATLAB
desktop will not be started.
-jdb [port] - Enable remote Java debugging on port (default 4444)
-r MATLAB_command - Start MATLAB and execute the MATLAB_command.
-logfile log - Make a copy of any output to the command window
in file log. This includes all crash reports.
-Ddebugger [options] - Start debugger to debug MATLAB.
-nouserjavapath - Ignore custom javaclasspath.txt and javalibrarypath.txt files.
在命令行下运行matlab,主要用到上面几个红色的参数。
1.直接运行Matlab
$ matlab
然后可以直接运行matlab脚本
2.运行m文件
如果m文件名为matlabfile.m
(1)方法一
进入m文件所在目录后,运行
$ matlab -nodesktop -nosplash -rmatlabfile
只用文件名matlabfile,不能添加.m
(2)修改.bashrc文件
$ vim ~/.bashrc
添加如下:
# Add an “mrun” alias for running matlab in the terminal.
alias mrun=”matlab -nodesktop -nosplash -logfile `date +%Y_%m_%d-%H_%M_%S`.log -r”
保存后,进入.m文件所在目录,运行
$ mrun matlabfile

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
linux目录操作命令
目录的创建 比如我要在根目录下创建lives/human/man/programmer/目录,怎么创建? 阶梯式创建目录 ---mkdir 首先创建lives,其次创建human,进而创建man,然后创建programmer: [root@localhost /]# mkdir /lives [root@localhost /]# mkdir /lives/human [root@localhost /]# mkdir /lives/human/man [root@localhost /]# mkdir /lives/human/man/programmer 是不是有些繁琐?是!但是,这样创建目录,可以控制每一层目录的创建符合你的预期,错了,立马可以纠正。 跳跃式创建目录 ---mkdir -p 比如你想在/lives/human/下创建woman/consumer目录,问题是此时并没有woman目录,只有在woman的基础上才能创建onsumer, 如果强制创建,你将会看到: [root@localhost /]# mkdir /lives/human/woman/consumer ...
- 下一篇
centos6.x 使用raid5构建lvm逻辑卷
1、将之前实验环境还原: a、利用umount先卸载之前挂载的文件系统; b、修改/etc/fstab里面的数据,让开机不会自动挂载; c、利用fdisk将该分区删除; 整合raid5和lvm实验 实验环境: 一块6G的盘,分成5个分区,每个分区1G。 其中4个作为active态,一个为spare态。 fdisk -l 开始磁盘分区: [plain] view plain copy Disk/dev/sdd:6442MB,6442450944bytes 255heads,63sectors/track,783cylinders Units=cylindersof16065*512=8225280bytes Sectorsize(logical/physical):512bytes/512bytes I/Osize(minimum/optimal):512bytes/512bytes Diskidentifier:0x00000000 [plain] view plain copy [root@srcxtts~]#fdisk/dev/sdd Devicecontainsneitherav...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果
- Docker快速安装Oracle11G,搭建oracle11g学习环境
- Windows10,CentOS7,CentOS8安装Nodejs环境
- Hadoop3单机部署,实现最简伪集群
- Eclipse初始化配置,告别卡顿、闪退、编译时间过长
- 设置Eclipse缩进为4个空格,增强代码规范
- CentOS7编译安装Gcc9.2.0,解决mysql等软件编译问题
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- Docker安装Oracle12C,快速搭建Oracle学习环境
- Windows10,CentOS7,CentOS8安装MongoDB4.0.16