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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

질문:

2012년 3월 24일

답변:

2019년 12월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by