How to create a new matrix with some known rows

2 次查看(过去 30 天)
Hello everyone,
Suppose matrix a is like:
a = [2;3;6;2];
b = [1 3 6;2 3 7;2 2 1;3 1 9;3 2 8;4 1 5];
Then, I want matrix c to be like:
c = [2 3 7;2 2 1;4 1 5;2 3 7]
Matrix c is included all row numbers from matrix b which is in matrix a.

采纳的回答

Sara
Sara 2014-7-9

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by