Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get the size of a file in MATLAB?

Tags:

file-io

matlab

What is the best way to figure out the size of a file using MATLAB? The first thought that comes to mind is size(fread(fid)).

like image 918
weiyin Avatar asked May 11 '09 19:05

weiyin


People also ask

How do you check file size?

Locate the file or folder whose size you would like to view. Click the file or folder. Press Command + I on your keyboard. A window opens and shows the size of the file or folder.

How do I find the size of an image in MATLAB?

Direct link to this questionm = size(readImage1);

How many bytes is a number in MATLAB?

hi, matlab uses 8 bytes to memorize a number like 1 as double as 2 bytes to memorize it as char?


1 Answers

Please see the dir function as stated above.

Please note that the dir function works on files and not on directories only.

>> s = dir('c:\try.c')  s =          name: 'try.c'        date: '01-Feb-2008 10:45:43'       bytes: 20       isdir: 0     datenum: 7.3344e+005 
like image 107
Elazar Leibovich Avatar answered Sep 20 '22 09:09

Elazar Leibovich