find matching indexes
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have two matrices:
A: x rows and 5 columns
B: x rows and 6 columns (the first column contains indexes)
The values of the matrix A are included in the matrix B. I would like to find the indexes of the matrix A (one row)
2 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Daniel Shub
am 2 Dez. 2011
I think you want something like
[x, ia, ib] = intersect(A, B(:, 2:end), 'rows');
B(1, ib)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!