Matlab from Command promt

1 回表示 (過去 30 日間)
john birt
john birt 2012 年 3 月 24 日
回答済み: Bibhav Poudel 2019 年 12 月 11 日
So I have a matlab function
function F = myfun5(x)
F = x+5;
exit;
and when I run this from the Windows Command Line
matlab nosplash -r myfun5(3) -logfile c:\temp\logfile
It all works, but the log file is empty, it does not include the answer

採用された回答

Oleg Komarov
Oleg Komarov 2012 年 3 月 24 日
matlab -nosplash -nodesktop -minimize -r "a = myfun5(3), exit" -logfile C:\logfile.txt
where
function F = myfun5(x)
F = x+5;
end
otherwise it exits before returning the value to the cmd window.

その他の回答 (1 件)

Bibhav Poudel
Bibhav Poudel 2019 年 12 月 11 日
license

カテゴリ

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