フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

cell performance in structure

1 回表示 (過去 30 日間)
Yingke
Yingke 2012 年 2 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Dear All
Do you have any suggestions about how to improve the performance of cell matrix?
I found that if we are going to intensively manipulate a big cell matrix in a structure, it is faster to make a copy, do what we want to do on this copy and then assign the copy back to structure. Is it right? Why? Is it means that getting the field of one structure has a big overhead?
Another question, is there any good way to delete a row of elements in cell matrix besides cell_mat(mask,:) = []?
Thanks a lot in advance.
  1 件のコメント
James Tursa
James Tursa 2012 年 2 月 21 日
Please post some code showing us exactly how you are extracting the cell matrix, manipulating it, etc, etc. Then we can comment on better ways of doing things (if we know any). Your method of deleting row element is a good one as long as you are not doing this repeatedly for different masks. If that is the case, it would be best to construct the overall mask up front and then delete the rows only once, since every time you delete rows it causes a data copy of the remaining rows to take place.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by