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

前端 未结 7 1854
耶瑟儿~
耶瑟儿~ 2020-12-09 07:36

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)).

7条回答
  •  渐次进展
    2020-12-09 08:27

    Use the fact that MatLab has access to Java Objects:

    myFile = java.io.File('filename_here')
    flen = length(myFile)
    

提交回复
热议问题