matrix row extraction help

조회 수: 2 (최근 30일)
Ahsan Khan
Ahsan Khan 2013년 3월 13일
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

채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 3월 13일
편집: Andrei Bobrov 2013년 3월 13일
x = randi(150,40,10); % your matrix
out = x(7:7:end,:);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by