0

I am a Matlab novice and imagine the following is simple however I am stumped with the below. I need to reshape a 315693x1838 matrix. Below is an example of how it needs to be reshaped:

19 20 21 22 23
10 11 12 13 14
13 14 15 16 17

As

19 20 10 11 13 14
21 22 12 13 15 16
22 23 13 14 16 17

Is there a simple command for this as I cannot find one?

Thank you

1 Answers1

2

MatLab is great and most of the functions do what they say.

M = [1 2; 3 4; 5 6]

reshape(M', 1, 6)

For more details just

help reshape
kostek
  • 801
  • 2
  • 15
  • 32