Take lines from array
Show older comments
I have an 64X4 array A , and I want take out every first 2 lines in every 4 line, is there some easy way to do that?
Accepted Answer
More Answers (1)
KSSV
on 4 Jan 2019
A = rand(64,2) ;
B = reshape(A',2,4,[]) ;
B = permute(B,[2 1 3]) ;
iwant = B(1:2,:,:) ;
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!