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일

1 개 추천

x = randi(150,40,10); % your matrix
out = x(7:7:end,:);

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by