Matlab from Command promt

조회 수: 11(최근 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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by