How do I create a table that I don't now the size of ahead of time?

11 vues (au cours des 30 derniers jours)
I'd like to creat a table for which I know the number of columns/variable names. However, I don't know how big (how many rows) it needs to be ahead of time and want the number of rows to increase as data is stored in it. Is this possilbe?

Réponse acceptée

Walter Roberson
Walter Roberson le 2 Juil 2020
  2 commentaires
Jeff Miller
Jeff Miller le 3 Juil 2020
Just a comment that I found this pretty slow, in case speed is an issue for you. In my case, it was much faster to accumulate the variables as separate vectors and assemble them into a table after they reached their final sizes.
Walter Roberson
Walter Roberson le 3 Juil 2020
Good point, Jeff.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by