How to delete the columns in a structure array

22 ビュー (過去 30 日間)
Tomer
Tomer 2020 年 2 月 27 日
編集済み: SS 2020 年 2 月 27 日
Hi.
I have a structure array HT (1 x 50000) with 20 fields. I want to delete the columns whose size is less than 10.
  2 件のコメント
Stephen23
Stephen23 2020 年 2 月 27 日
"I have a structure array HT (1 x 50000) with 20 fields. I want to delete the columns whose size is less than 10."
Your structure only has one row, so it is not clear what "...size less than 10" refers to.
Tomer
Tomer 2020 年 2 月 27 日
All fields have same length, I want to delete that particular column whose field length is less than 10.

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

採用された回答

SS
SS 2020 年 2 月 27 日
編集済み: SS 2020 年 2 月 27 日
A similar question was asked by me in the past.
HT(any(cellfun(@numel,struct2cell(HT)) < 10)) = []
  1 件のコメント
Tomer
Tomer 2020 年 2 月 27 日
Thanks.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by