matrix row extraction help

1 回表示 (過去 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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by