how to print and fetch input of matlab file from system's CMD? And how to run from command line?

1 回表示 (過去 30 日間)
Divya
Divya 2019 年 4 月 22 日
編集済み: Walter Roberson 2019 年 4 月 23 日
How to print matlab output on systems cmd and disable the matlab command window?
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 4 月 23 日
Are we permitted to disable java and desktop mode for this purpose?
Divya
Divya 2019 年 4 月 23 日
編集済み: Divya 2019 年 4 月 23 日
ya

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 4 月 23 日
編集済み: Walter Roberson 2019 年 4 月 23 日
matlab -nojvm -nodesktop -r 'try; YOURFUNCTIONNAMEHERE; catch ME; end; quit' < INPUTFILENAMEHERE > OUTPUTFILENAMEHERE
If you are using Mac or Linux with a derivative of the Bourne Shell but not the C Shell, then put
2>&1
at the end of that to redirect stderr.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by