필터 지우기
필터 지우기

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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by