Usually I preallocate using cell()
, zeros()
or ones()
depending on the type of data, but what is the best way to preallocate a table as it can hold various data structures?
I am talking about the table()
functionality added in Matlab 2013b.
Obviously I can reserve memory using code like this:
T = table(cell(x,y))
but when my table is supposed to hold various datatypes I run into problems. Just imagine I want to fill in a column of integers now, or like in my case fill each row with an observation containing a string, an integer and a floating point number. T