Does adding variables to table cause Matlab to re-write the entire table in memory?
1 回表示 (過去 30 日間)
古いコメントを表示
Rueben Mendelsberg
2023 年 10 月 31 日
コメント済み: Rueben Mendelsberg
2023 年 10 月 31 日
If I add columns/variables to a table that already exists, is the entire table rewritten to memory like a matrix is when adding an element outside of the existing matrix size?
0 件のコメント
採用された回答
Walter Roberson
2023 年 10 月 31 日
No. Internally, tables have a cell array with one cell entry for each variable. The cell array would have to be extended, but that is a relatively inexpensive operation (the cell contents do not have to be copied, just the pointers to the entries.)
Now, adding new rows on the other hand requires rewriting each cell array member.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!