How to create a new matrix with some known rows

5 vues (au cours des 30 derniers jours)
Moe
Moe le 9 Juil 2014
Réponse apportée : Sara le 9 Juil 2014
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.

Réponse acceptée

Sara
Sara le 9 Juil 2014

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by