Suppose I have a 2 by 60 matrix, like A = [1:60,2:61] how can I reshape it by the first 10 rows so that I can get a 20 by 6 matrix??
4 views (last 30 days)
Show older comments
Uzochukwu Akabueze on 12 Oct 2021
Commented: Uzochukwu Akabueze on 13 Oct 2021
B = reshape(A,rowSize(A)/6,,6)
Chetan Bhavsar on 12 Oct 2021
A = [1:60;2:61]
B = reshape(A,[20,6])
More Answers (0)
Find more on Resizing and Reshaping 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!