How to delete elements from a struct array?

34 visualizaciones (últimos 30 días)
Asher Zaidi
Asher Zaidi el 20 de Jul. de 2018
Comentada: Asher Zaidi el 20 de Jul. de 2018
I have a large struct array:
>> statsDefects.Area
ans =
25
ans =
23
...
How can I remove all numbers that are greater than 500?

Respuesta aceptada

James Tursa
James Tursa el 20 de Jul. de 2018
Not exactly sure what you want to do. If you want to delete all structure elements (i.e., all fields for that element) where the area is greater than 500, then this
statsDefects([statsDefects.Area]>500) = [];

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by