how to resize a matrix two pair of two numbers stacked together?
1 view (last 30 days)
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.
Abhijit Nayak on 22 Jun 2022
According to my understanding you want to arrange the odd and the even numbers from a 1-D matrix into a 2-D matrix but with a certain arrangement.
I have given a code according to your given number list but it can be modified according to the requirement.
a = 1:16;