How can i find a certain vector in a matrix?

57 次查看(过去 30 天)
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

采纳的回答

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

更多回答(1 个)

Matt J
Matt J 2019-12-2
[~,loc]=ismember(vector.',Matrix.','rows');

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by