Delete a row in a structure that contains a certain word

2 Ansichten (letzte 30 Tage)
AA
AA am 3 Aug. 2019
Beantwortet: Walter Roberson am 3 Aug. 2019
Hi,
I have a 1×5897 struct array with fields. How do I delete the entire rows that contain the letters 'AA'.
  3 Kommentare
AA
AA am 3 Aug. 2019
The heading of the column Letters has several letters in that struct array. AA is one of them.
AA
AA am 3 Aug. 2019
so if the structure is called Random then you can find the column amongst Random.Letters

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by