How to delete elements from a struct array?
조회 수: 34 (최근 30일)
이전 댓글 표시
I have a large struct array:
>> statsDefects.Area
ans =
25
ans =
23
...
How can I remove all numbers that are greater than 500?
댓글 수: 0
채택된 답변
James Tursa
2018년 7월 20일
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) = [];
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!