matrix vs cells vs table?

79 visualizaciones (últimos 30 días)
Zeynab Mousavikhamene
Zeynab Mousavikhamene el 2 de Oct. de 2019
Respondida: Walter Roberson el 2 de Oct. de 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.

Respuestas (1)

Walter Roberson
Walter Roberson el 2 de Oct. de 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.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by