take selected rows from given matrix

1 visualización (últimos 30 días)
JaeSung Choi
JaeSung Choi el 22 de Nov. de 2017
Comentada: JaeSung Choi el 22 de Nov. de 2017
How can i take selected rows from given matrix??
For instance, let A = rand(100) and i want to take 10th,20th,30th ----100th row from A
Without using 'for' ( since i have to do many times, speed is important ), deriving is possible?? Help me!

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 22 de Nov. de 2017
out = A(10:10:end,:);

Más respuestas (1)

Birdman
Birdman el 22 de Nov. de 2017
A(10:10:100,:)

Categorías

Más información sobre 행렬과 배열 en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!