Delete a row in a structure that contains a certain word

조회 수: 3 (최근 30일)
AA
AA 2019년 8월 3일
답변: Walter Roberson 2019년 8월 3일
Hi,
I have a 1×5897 struct array with fields. How do I delete the entire rows that contain the letters 'AA'.
  댓글 수: 3
AA
AA 2019년 8월 3일
The heading of the column Letters has several letters in that struct array. AA is one of them.
AA
AA 2019년 8월 3일
so if the structure is called Random then you can find the column amongst Random.Letters

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2019년 8월 3일
mask = ismember({Random.Letters}, 'AA') ;
Random(mask) = [] ;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by