"maan " <
maan_...@yahoo.com> wrote in message <jj1099$p2$
1...@newscl01ah.mathworks.com>...
Must be a better way, but..
From string:
v = '01110110'
a = '01100001'
A = [v a]
tostring = @(x)char(bin2dec(reshape(x,8,prod(size(x))/8)'))'
tostring(A)
v = cast([0 1 1 1 0 1 1 0],'logical')
a = cast([0 1 1 0 0 0 0 1],'logical')
A = [v a]
tostring = @(x)char(sum(bsxfun(@times,(2.^[7:-1:0]),reshape(x,8,prod(size(x))/8)'),2))'
tostring(A)