zoukankan      html  css  js  c++  java
  • Linux下使用matlab在后台默默的运行.m文件(无界面形式)

    Linux下使用matlab在后台默默的运行.m文件(无界面形式)
    本主在Ubuntu18.04LTS上已经安装了matlab
    直接运行Matlab
    $ matlab
    会启动 matlab,出现启动界面
    但想要,在后台默默的运行.m文件,如何设置呢?
    进入要运行的.m文件所在目录,执行:
    $ matlab -nodesktop -nosplash -r matlabfile(不含.m后缀名)
    如:$ matlab -nodesktop -nosplash -r create_training_set_shtech

    < M A T L A B (R) >
    Copyright 1984-2014 The MathWorks, Inc.
    R2014a (8.3.0.532) 64-bit (glnxa64)
    February 11, 2014


    To get started, type one of these: helpwin, helpdesk, or demo.
    For product information, visit www.mathworks.com.

    Warning: Directory already exists.
    > In create_training_set_shtech at 23
    .......................

    另外一种方式:
    修改.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(不含.m后缀名)

    如:$ mrun create_training_set_shtech

    < M A T L A B (R) >
    Copyright 1984-2014 The MathWorks, Inc.
    R2014a (8.3.0.532) 64-bit (glnxa64)
    February 11, 2014


    To get started, type one of these: helpwin, helpdesk, or demo.
    For product information, visit www.mathworks.com.

    Warning: Directory already exists.
    > In create_training_set_shtech at 23
    .......................

  • 相关阅读:
    全面解析Vue.nextTick实现原理
    js 宏任务和微任务
    模拟实现ES6的set类
    git客户端出现libpng warning: iCCP: known incorrect sRGB profile
    js封装、继承
    js单例模式
    并行运行多个python虚拟机
    关于场景服务的一些想法
    关于不能对闭包函数进行热更新的问题
    Python string interning原理
  • 原文地址:https://www.cnblogs.com/jeshy/p/11756032.html
Copyright © 2011-2022 走看看