How do you avoid unnecessary copies when modifying table objects?
15 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Matt J
2022-2-17
编辑:Matt J
2022-2-17
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 个评论
Matt J
2022-2-18
Thanks for providing that test! I see it's not making a copy.
You're quite welcome. If your question is resolved, though, please Accept-click the answer.
更多回答(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!