フィルターのクリア

How to delete elements from a struct array?

35 ビュー (過去 30 日間)
Asher Zaidi
Asher Zaidi 2018 年 7 月 20 日
コメント済み: Asher Zaidi 2018 年 7 月 20 日
I have a large struct array:
>> statsDefects.Area
ans =
25
ans =
23
...
How can I remove all numbers that are greater than 500?

採用された回答

James Tursa
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) = [];
  1 件のコメント
Asher Zaidi
Asher Zaidi 2018 年 7 月 20 日
Yes, that's exactly what I wanted! Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by