Best multi data type export options [table,struct,cell array, etc..] also file types

I have a general question on exporting data to files and importing them in at a later date for processing. What would be an ideal class (struct, cell array, table etc) to export my data in under the following conditions:
  • multiple data types, but all numeric (uint8, uint32, uint16, double, double, double)
  • each "group" of data will be a 8x6 array
  • would love to be able to assign header names to columns and maybe rows
  • plan to use this as a mini database, will write a function to append a "group" of data to the current mini DB
  • plan to write functions to do conditional processing (based on values in all the columns or just some) (ie. statistics etc)
  • would like to use MATLAB to manage this "mini DB" (it will not extend past 10,000 groups of data anytime soon)
  • I will have a standalone application constantly looping and adding the groups of data to the mini DB.
Currently the way I have it implemented is using the table class to write to and read from a .txt file. Pretty sure this isn't the optimal way to do this.
Did some research and it seems maybe cell arrays and .mat files would be the best approach?

답변 (1개)

Peter Perkins
Peter Perkins 2018년 8월 3일
It's hard to say for sure, but it's likely that you don't want to use cell arrays, because that will make working with the data much more difficult. I don't know what you mean by "groups", but it seems like if you have mixed-type data that you want to attach names to, tables are the right thing to use. What kind of file you want to use depends on what you are doing with the files, but if you are reading/writing entirely from within MATLAB, a .mat file seems like a good choice.

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

제품

릴리스

R2017b

질문:

2018년 7월 18일

답변:

2018년 8월 3일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by