selecting 2 bits from given input bit stream alternatively

 Respuesta aceptada

A=reshape(a,2,[])';
b=A(1:2:end,:);
c=A(2:2:end,:);%matrix form
%you could also convert to binary
A=sum(A.*[2 1],2);
b=dec2bin(A(1:2:end),2);
c=dec2bin(A(2:2:end),2);

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de Ag. de 2021

Respondida:

el 17 de Ag. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by