bits of a binary input

1 次查看(过去 30 天)
lina it
lina it 2012-3-29
i have a binary user input saved in a non-cell how can i deal with each bit of that number independently ?
  1 个评论
Jan
Jan 2012-3-29
Please explain, what a "binary user input saved in a non-cell" means in valid Matlab syntax.

请先登录,再进行评论。

回答(1 个)

Thomas
Thomas 2012-3-29
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

类别

Help CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by