delete rows from matrix A in patten

delete rows from 5400x4096 matrix A in patten: The pattern of rows is keep 60, delete 60, keep 60, delete 60

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 10 月 22 日

0 投票

B = reshape(A, 60, [], size(A,2));
B = reshape( B(1:2:end, :, :, :), [], size(A,2) );
Andrei Bobrov
Andrei Bobrov 2016 年 10 月 22 日

0 投票

Maybe so?
out = A(rem(ceil(1:size(A,1))/60,2)==1,:);

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

質問済み:

2016 年 10 月 22 日

回答済み:

2016 年 10 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by