Matlab from Command promt
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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.
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!