bits of a binary input

i have a binary user input saved in a non-cell how can i deal with each bit of that number independently ?

1 comentario

Jan
Jan el 29 de Mzo. de 2012
Please explain, what a "binary user input saved in a non-cell" means in valid Matlab syntax.

Iniciar sesión para comentar.

Respuestas (1)

Thomas
Thomas el 29 de Mzo. de 2012

0 votos

I dont know if this is what you are looking for..
c=[111111 010101 101010]
a=num2str(c)
to operate on each bit individually use
a(1) % or str2num(a(1)) and so on

Preguntada:

el 29 de Mzo. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by