Filter löschen
Filter löschen

How to delete elements from a struct array?

35 Ansichten (letzte 30 Tage)
Asher Zaidi
Asher Zaidi am 20 Jul. 2018
Kommentiert: Asher Zaidi am 20 Jul. 2018
I have a large struct array:
>> statsDefects.Area
ans =
25
ans =
23
...
How can I remove all numbers that are greater than 500?

Akzeptierte Antwort

James Tursa
James Tursa am 20 Jul. 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) = [];

Weitere Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by