Delete specific rows in table

조회 수: 3 (최근 30일)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019년 10월 4일
댓글: Daniel M 2019년 10월 4일
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