フィルターのクリア

How to compare a cell to a single value?

25 ビュー (過去 30 日間)
Haziq Razali
Haziq Razali 2019 年 4 月 29 日
回答済み: Jan 2019 年 4 月 29 日
I want to create a mask where it is true if value in cell == frame. This works
mask=(behaviours.frame(:) == frame);
print(behaviours.frame(:))
585
586
586
587
587
588
588
589
589
590
590
591
591
592
592
593
593
594
594
but this does not. How do I make it work? thx
mask=(behaviours_currframe.ID{:} == ID);
>> behaviours_currframe.ID{:}
ans =
'pedestrian1'
ans =
'pedestrian2'

採用された回答

Jan
Jan 2019 年 4 月 29 日
mask = strcmp({behaviours_currframe.ID}, ID)

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by