Delete a row in a structure that contains a certain word

Hi,
I have a 1×5897 struct array with fields. How do I delete the entire rows that contain the letters 'AA'.

3 Kommentare

Is the AA to be in one particular field, or in any of the fields? Is the field to match exactly or is the AA to occur anywhere inside a longer string?
The heading of the column Letters has several letters in that struct array. AA is one of them.
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

mask = ismember({Random.Letters}, 'AA') ;
Random(mask) = [] ;

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by