How to split .mat V4 files into smaller files?
8 ビュー (過去 30 日間)
古いコメントを表示
Hi,
We have an application that exports data collected by oscilloscopes to .mat v4 format.
Unfortunately this format has a limit of 100 million elements per array. Our application can save more than this number to a file resulting in an error.
Is there a way to split the existing data files in MATLAB? I've tried the following:
m = matfile('VSL023.mat')
Warning: Unable to read some of the variables due to unknown MAT-file error.
> In MatFile>MatFile.genericWho at 209 In MatFile>MatFile.whos at 309 In MatFile>MatFile.MatFile at 422 In matfile at 75
m =
matlab.io.MatFile
Properties:
Warning: Unable to read some of the variables due to unknown MAT-file error.
> In MatFile>MatFile.genericWho at 209 In MatFile>MatFile.whos at 309 In MatFile>MatFile.disp at 536
If I try using the splitmat function file from 'How do I recover data from a corrupt MAT-file? ' I get
Error using fread Out of memory. Type HELP MEMORY for your options.
Error in splitmat (line 18) data = fread(f, h2(2));
The mat file is around 800MB.
I'm using MATLAB 2013a 64-bit on Windows 8:
Maximum possible array: 4701 MB (4.930e+09 bytes) * Memory available for all arrays: 4701 MB (4.930e+09 bytes) * Memory used by MATLAB: 586 MB (6.143e+08 bytes) Physical Memory (RAM): 3017 MB (3.164e+09 bytes)
Thanks,
2 件のコメント
Jan
2013 年 10 月 1 日
I do not understand the problem completely. You have an application which has written files, which should actually have the MAT v4 format, but because the application writes more data than allowed, the files are not recognized by Matlab anymore. Is this correct? Are you sure, that the corruption of the format did not overwrite important data? Or in other words: Do you have an evidence, that the data can be extracted from the files correctly? If not, they are garbage.
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import and Analysis についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!