take selected rows from given matrix

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!

 採用された回答

Andrei Bobrov
Andrei Bobrov 2017 年 11 月 22 日

1 投票

out = A(10:10:end,:);

その他の回答 (1 件)

Birdman
Birdman 2017 年 11 月 22 日

1 投票

A(10:10:100,:)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!