Prev: how to plot 2D graphs in multiple 3D levels
Next: Is there a better way to create this repetitive array?
From: subbu on 12 May 2010 15:02 Hi friends, I have a matrix of dimension (2541 x 1). I need to rewrite this matrix into (121 x 21) The first 121 elements in matrix one will be the first row in second matrix and so on.... remember 121 x 21 =2541 please can someone help me... thanks in advance... cheers
From: Ashish Uthama on 12 May 2010 15:13
On Wed, 12 May 2010 15:02:21 -0400, subbu <ysrhcu(a)yahoo.com> wrote: > Hi friends, > > I have a matrix of dimension (2541 x 1). I need to rewrite this matrix > into (121 x 21) > The first 121 elements in matrix one will be the first row in second > matrix and so on.... > > remember 121 x 21 =2541 > > please can someone help me... > > thanks in advance... > > cheers You are looking to change the 'shape' of the array. i.e reshape it. http://www.mathworks.com/support/ Right side search box, choose documentation from the drop down Search for 'reshape array' And then, you might also transpose/shiftdim/permute |