Info

此问题已关闭。 请重新打开它进行编辑或回答。

How to extract some rows from a matrix which crosspond to some value in another vector?

1 次查看(过去 30 天)
I have a matrix
D= [ 1 11 1 1; 1 2 3 4; 5 6 7 8]; V=[3 2 2];
How to extract all the rows which crossponds to v=2 ?

回答(1 个)

Cris LaPierre
Cris LaPierre 2020-2-18
D(V==2,:)

Community Treasure Hunt

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

Start Hunting!

Translated by