MATLABでファイルのサイズを取得したい
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kazutoshi Ishioka
le 8 Oct 2020
Commenté : Kazutoshi Ishioka
le 8 Oct 2020
お世話になります
MATLABの関数でファイルのサイズを取得したいです
例えば「data.xls」という3Kbyteファイルがあり、このファイルのサイズを取得して変数に保存したいです
例えば以下のような感じで記述できるとありがたいです
>> t_fileSize = GetFileSize( 'data.xls' )
t_fileSizei =
3000
よろしくお願い致します
0 commentaires
Réponse acceptée
Akira Agata
le 8 Oct 2020
dir 関数が使えるかと思います。
たとえば以下のようにすると、data.xlsのファイルサイズ [bytes] が変数 t_fileSize に格納されます。
s = dir('data.xls');
t_fileSize = s.bytes;
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!