Delete specific rows in table

1 次查看(过去 30 天)
I want a table that has all values that their cell_type is 4 and get rid of those row that their cell_type is not 4.
Any suggestion?Capture.JPG

采纳的回答

Daniel M
Daniel M 2019-10-4
T(T.cell_type~=4,:) = [];
% where T is the name of your table
  1 个评论
Daniel M
Daniel M 2019-10-4
If you want to keep the original table and make a new table only containing rows with cell_type 4, it is trivial.
T2 = T(T.cell_type==4,:);

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by