Find index between two vectors
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 6 Lug 2015
Modificato: Azzi Abdelmalek
il 6 Lug 2015
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'))
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Calendar in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!