how to resize a matrix two pair of two numbers stacked together?
Show older comments
i have a matrix like a = 1:16; %1x16 double to
I want a new matrix having
b = [1 2 9 10; 3 4 11 12; 5 6 13 14; 7 8 15 16]'; % 4x4 double
Two numbered pair to be rized to 4 by 4 matrix.
Can anyone please help. Any help is greatly appriciated.
Accepted Answer
More Answers (1)
you can do this with the reshape command:
a = (1:16)'
b = reshape(a, 4, [] )
Categories
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!