Find index between two vectors

Good Afternoon,
I have a matrix of datevecs. So it looks like this:
2015 1 1 14 59 0
2015 1 1 15 0 0
I need to find the index where the 4th column is 14 AND the 5th column is 59.
I appreciate everyone's help.

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 6 日
編集済み: Azzi Abdelmalek 2015 年 7 月 6 日

2 投票

A=[2015 1 1 14 59 0
2015 1 1 15 0 0]
idx=find(A(:,4)==14 & A(:,5)=59)
or
idx=find(ismember(A(:,4:5),[14 59],'rows'))

その他の回答 (1 件)

Cary
Cary 2015 年 7 月 6 日

0 投票

Thank you Azzi!

カテゴリ

ヘルプ センター および File ExchangeData Type Identification についてさらに検索

製品

質問済み:

2015 年 7 月 6 日

回答済み:

2015 年 7 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by