Delete a row in a structure that contains a certain word

3 vues (au cours des 30 derniers jours)
AA
AA le 3 Août 2019
Hi,
I have a 1×5897 struct array with fields. How do I delete the entire rows that contain the letters 'AA'.
  3 commentaires
AA
AA le 3 Août 2019
The heading of the column Letters has several letters in that struct array. AA is one of them.
AA
AA le 3 Août 2019
so if the structure is called Random then you can find the column amongst Random.Letters

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 3 Août 2019
mask = ismember({Random.Letters}, 'AA') ;
Random(mask) = [] ;

Plus de réponses (0)

Catégories

En savoir plus sur Structures dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by