how to find matrix in a matrix?

6 Ansichten (letzte 30 Tage)
eri
eri am 17 Okt. 2012
i have matrix a and b. matrix b is created from matrix a components(rows in this case). now i want to find out from which row of matrix a did matrix b created?
for example:
a=[4 5 7;5 8 9;6 3 1;9 8 5;7 6 5]
b=[4 5 7;6 3 1;9 8 5]
answer:
1;3;4

Akzeptierte Antwort

Matt J
Matt J am 17 Okt. 2012
Use the command ismember(...,'rows')

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by