matrix row extraction help

1 visualización (últimos 30 días)
Ahsan Khan
Ahsan Khan el 13 de Mzo. de 2013
hi there, i have a very simple question. how do i extract certain rows from a matrix. for example say i have a matrix nxm and i want to extract every 7th row from that matrix. how do i do that? thanks in advance. SN

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 13 de Mzo. de 2013
Editada: Andrei Bobrov el 13 de Mzo. de 2013
x = randi(150,40,10); % your matrix
out = x(7:7:end,:);

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices 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!

Translated by