How can I use the NULL file in MATLAB 7.3 (R2006b)?

조회 수: 6 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
편집: Rena Berman 2017년 4월 3일
I would like to use the NULL file from MATLAB to suppress output to the screen. In earlier releases of MATLAB I would use the file identifier of 0 for this purpose.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2017년 3월 31일
Prior to MATLAB R2013b, the syntax for opening a NULL file on Windows is:
null = fopen('NUL:')
On UNIX/Linux the NULL file is opened by using:
null = fopen('/dev/null')
To open a NULL file using MATLAB R2013b on Windows, the syntax is:
null = fopen('NUL ')
Please note that there is now a space between the "L" and the terminating apostrophe.
The returned file identifier can be used in FPRINTF or FWRITE.
 
  댓글 수: 1
Rena Berman
Rena Berman 2017년 4월 3일
편집: Rena Berman 2017년 4월 3일
(Answers dev) The article has been updated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품


릴리스

R2006b

Community Treasure Hunt

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

Start Hunting!

Translated by