Is it possible to write a large table into a binary file? How?
古いコメントを表示
I have a large table. If I write it into a text file, it is huge. Is it possible to write a large table into a binary file? If yes, how?
I googled this subjest, but all the links only refer to non-table type. For table, writetable function does not mention binary file.
Thanks.
Jennifer
2 件のコメント
Sean de Wolski
2015 年 8 月 31 日
Do you need to open it outside of MATLAB? If not, just use save and save it using -v7.3 which will compress it.
JFz
2015 年 8 月 31 日
回答 (2 件)
Walter Roberson
2015 年 8 月 31 日
0 投票
How about if you write it to a .xls file? You could specify 'FileType', 'spreadsheet' but it should assume that for .xls file extensions.
Image Analyst
2015 年 8 月 31 日
0 投票
Exactly how big is "huge" to you?
You can use writetable() to write a binary file. For example an .xlsx file is binary. Or you could use a .mat file by calling save(). Or you could just do it real low level by calling fwrite() yourself.
5 件のコメント
Walter Roberson
2015 年 8 月 31 日
.xlsx is XLM which is text based, not binary.
JFz
2015 年 8 月 31 日
JFz
2015 年 8 月 31 日
JFz
2015 年 8 月 31 日
Image Analyst
2015 年 8 月 31 日
It's a proprietary format. Ultimately, everything in digital computers is binary. I suggest you just don't care about that and only worry about what the final size is, if that matters to you. But 40 MB is somewhat large, but I wouldn't call it huge. I regularly work with images a hundred times that size.
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!