Reshape does not Use the Columns I Want
Show older comments
So, I have a matrix x=
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
I want to create a 2-column matrix with indefinite numbers of rows and to do that I use
reshape(x,[],2). The result I get is
1 3
5 7
9 11
13 15
17 19
2 4
6 8
10 12
14 16
18 20
But I'd like to have
1 2
5 6
9 10
13 14
17 18
3 4
7 8
11 12
15 16
19 20
What can I do?
Accepted Answer
More Answers (0)
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!