フィルターのクリア

How do you avoid unnecessary copies when modifying table objects?

1 回表示 (過去 30 日間)
Kyle Padilla
Kyle Padilla 2022 年 2 月 17 日
コメント済み: Kyle Padilla 2022 年 2 月 18 日
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?

採用された回答

Matt J
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
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.
Kyle Padilla
Kyle Padilla 2022 年 2 月 18 日
Thanks @Walter Roberson, that clarifies it more for me.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by