在Linux命令列下執行Matlab的 m檔案

2021-08-27 18:05:44 字數 465 閱讀 9997

1、直接執行matlab:$matlab,然後可以直接執行matlab指令碼

2.執行m檔案

如果m檔名為matlabfile.m

(1)方法一

進入m檔案所在目錄後,執行

$ matlab -nodesktop -nosplash -r matlabfile

只用檔名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

Linux在命令列模式下執行命令

在linux預設的登入的模式中,主要分為兩種,一種是純文字介面的登入環境,另一種則是圖形介面的登入環境。linux預設提供6個終端介面來讓使用者登入,切換的方式為 ctrl alt f1 f6 系統會按 f1 f6 的順序分別命名為 tty1 tty6的操作介面環境。ctrl alt f1 f6 文...

二 在linux命令列執行命令

例1 顯示當前使用的shell root centos7 echo bin bash 例2 顯示當前系統使用的所有shell root centos7 cat etc shells bin sh bin bash sbin nologin usr bin sh usr bin bash usr sb...

怎樣在Linux命令列下檢視命令幫助?

command help 使用 help命令檢視命令的使用資訊,這個命令的輸出很簡單,檢視起來也比較方便。還有就是當在系統目錄中不存在真實的程式檔案 存在於bash程式裡 對於這部分命令,檢視幫助的方法就是使用help命令。例如 用help命令檢視passwd的幫助資訊 注意 在命令列中特殊符號的意...