Technical discussion about Matlab and issues related to Digital Signal Processing.
Post a new Thread
merge arrays - ohia2007 - Jun 6 20:20:24 2008
i need a help in order to merge the two binary arrays as in below
A=[0 1 1 0 1 0 ]
B=[0 0 1 1 1 0 ]
Merge the tow as
C=[00 10 11 01 11 00]
thanks

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )
Re: merge arrays - Jayaram Natarajan - Jun 8 19:44:35 2008
j=1;
for i =1 : 6
C[j] = A[i];
C[j+1]=B[i];
j=j+2;
end
this should work hopefully.
On 6/6/08, ohia2007 <o...@yahoo.com> wrote:
> i need a help in order to merge the two binary arrays as in below
>
> A=[0 1 1 0 1 0 ]
> B=[0 0 1 1 1 0 ]
>
> Merge the tow as
> C=[00 10 11 01 11 00]
>
> thanks
>

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )
Re: merge arrays - ATANU BANERJEE - Jun 9 7:02:13 2008
Try this,
c=10*a+b;
--
Best wishes,
Atanu Banerjee
"Life starts with a Voice but ends with Silence
Love starts with a Fear but ends with Tears
Friendship starts Anywhere and ends Nowhere "

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )