フィルターのクリア

How to index this structure

1 回表示 (過去 30 日間)
Mohannad Abboushi
Mohannad Abboushi 2017 年 2 月 7 日
編集済み: Adam 2017 年 2 月 7 日
So I have a structure with lots of fields and corresponding values. So for instance if I want to find the indexes for a range of 100-150 how would I do this? The find function doesn't seem to work for a vector: Select_struct=find([file.Position]==100:150)

採用された回答

Adam
Adam 2017 年 2 月 7 日
編集済み: Adam 2017 年 2 月 7 日
[~,matchingIdx] = ismember( [file.Position], 100:150 );
or
[~,matchingIdx] = ismember( 100:150, [file.Position] );
depending which way round you want the indices.

その他の回答 (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