MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   如何在MATLAB中获取文件的大小? (https://www.labfans.com/bbs/showthread.php?t=22666)

poster 2019-12-10 16:49

如何在MATLAB中获取文件的大小?
 
使用MATLAB找出文件大小的最佳方法是什么?首先想到的是size(fread(fid)) 。


回答:
请参阅上述[URL="http://www.mathworks.com/help/techdoc/ref/dir.html"]dir[/URL]函数。

请注意,dir函数仅对文件有效,而对目录不起作用。

>> s = dir('c:\try.c') s = name: 'try.c' date: '01-Feb-2008 10:45:43' bytes: 20 isdir: 0 datenum: 7.3344e+005

[url=https://stackoverflow.com/questions/849739]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:25

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.