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

Re: how to split a matrix

$
0
0
"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

Viewing all articles
Browse latest Browse all 19628

Trending Articles