MATLAB Answers

How can i find a certain vector in a matrix?

54 views (last 30 days)
Hey there,
I have a 3x370 Matrix and I want to find a 3x1 vector within the matrix.
Output should be the Column number of the 3x1 vector in the matrix.
I´be really glad if someone can help me :)
Greets Lukas


Sign in to comment.

Accepted Answer

David Hill
David Hill on 2 Dec 2019
Transpose and use ismember(A,B,'rows')
x=find(ismember(A,B,'rows'));%will give you the column numbers of A that match B

  1 Comment

Lukas Nuschele
Lukas Nuschele on 3 Dec 2019
Thank you very much ,this works perfect :)

Sign in to comment.

More Answers (1)

Matt J
Matt J on 2 Dec 2019


Sign in to comment.


Community Treasure Hunt

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

Start Hunting!

Translated by