matrix vs cells vs table?

64 views (last 30 days)
Zeynab Mousavikhamene
Zeynab Mousavikhamene on 2 Oct 2019
Answered: Walter Roberson on 2 Oct 2019
I need to figure out what are features of each one and when each of them is recommende.
I have sets of data that I need to store them, do some statistics on them (mean, STD) and plot. The sizes are changing. but I can find a strategy to fix the size (fix the size to largest dataset and assign zeros for shorter datasets. I care about cbeing comfortable and versatile to work and as fast as possible.

Answers (1)

Walter Roberson
Walter Roberson on 2 Oct 2019
The fastest read access is numeric arrays when all of the leading dimensions as : and the remaining dimensions are scalars.
Tables are more efficient for memory than cell arrays are. Some table operations are slower, but my understanding is that some of the common table-oriented operations are built in and fast.
If you are writing to the arrays, then there are some circumstances in which cell arrays can be more efficient, if it can be arranged that much less memory is copied in the copy-on-write phase of modifying variables.

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!