|
Thanks Dips, exactly what i want.
Burcu
"Dips Bhatia" <deepakdbhatia@gmail.com> wrote in message <hdhg0a$2ke$1@fred.mathworks.com>...
> "burcu " <burcu102@hotmail.com> wrote in message <hdhfbn$m36$1@fred.mathworks.com>...
> > Hi all,
> >
> > I have a nx1 matrix and i want to create an axb matrix from this lines by taking the first a columns and setting as column 1, taking next a columns and putting it right of the first a columns etc.
> > An example to be more clear:
> >
> > data= a
> > b
> > c
> > d
> > e
> > f
> > g
> > h
> > i have 8x1 matrix and i need to get a 2x4 matrix from this like:
> > a c e g
> > b d f h
> > Any advice to create such a matrix for a really big number of n?
> >
> > Thanks for all the replays!
> >
> > Burcu
>
> Use reshape(data,2,4)
> See help reshape
|