How can I use the NULL file in MATLAB?
8 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2009 年 6 月 27 日
編集済み: MathWorks Support Team
2024 年 8 月 30 日
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
2024 年 8 月 30 日
編集済み: MathWorks Support Team
2024 年 8 月 30 日
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.
Starting with R2017b it is not possible to open a NULL file with MATLAB on Windows anymore.
1 件のコメント
Rena Berman
2017 年 4 月 3 日
編集済み: Rena Berman
2017 年 4 月 3 日
(Answers dev) The article has been updated.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!