Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: how to split a matrix

$
0
0
"James Tursa" wrote in message <kh9fap$h62$1@newscl01ah.mathworks.com>...
> "Timothy Koh" <timothy_koh87@hotmail.com> wrote in message <kh9eo1$fmj$1@newscl01ah.mathworks.com>...
> > Hi
> >
> > I have a <39014400x1 double> matrix. How do i go about splitting it and merge it back together?
> >
> > Help is greatly appreciated
> >
> > Regards
> > Timothy
>
> How do you want it split? E.g.,
>
> a = rand(39014400,1);
> b = a(1:1000000); % split first part
> c = a(1000001:end); % split second part
> d = [b;c]; % join the pieces back together
>
> James Tursa

Thanks James Tursa. Is it possible to split it like into number of segments i want? Eg. splitting it into 20 segments.

Viewing all articles
Browse latest Browse all 19628

Trending Articles