Delete a row in a structure that contains a certain word

3 views (last 30 days)
Hi,
I have a 1×5897 struct array with fields. How do I delete the entire rows that contain the letters 'AA'.
  3 Comments
AA
AA on 3 Aug 2019
The heading of the column Letters has several letters in that struct array. AA is one of them.
AA
AA on 3 Aug 2019
so if the structure is called Random then you can find the column amongst Random.Letters

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 3 Aug 2019
mask = ismember({Random.Letters}, 'AA') ;
Random(mask) = [] ;

More Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!