How do you avoid unnecessary copies when modifying table objects?

1 view (last 30 days)
I'd like to avoid the performance cost of copying large amounts of data inside of tables. For example, if I wanted to add or remove columns from the table via a function, how would you do that without it creating a copy? Do you need to use handle classes or can this be acheived with the built-in tables?

Accepted Answer

Matt J
Matt J on 17 Feb 2022
Edited: Matt J on 17 Feb 2022
I think adding and removing columns from tables is largely like adding/removing elements from cell vectors, i.e., it involves no data copying.
  7 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Performance and Memory in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by