xor operation using loop
显示 更早的评论
i have 1 dimentional array say p=[1 0 1 0 1 1 1 0 0], now i want to xor its bits like
Q(l)= xor(p(i))...... where i=l,l+N,l+2n,l+3N...........upto i<10 And N=2 and 1<l<N
How to implement it in loop i dont understand..plz help me kindly
2 个评论
Mischa Kim
2014-2-24
编辑:Mischa Kim
2014-2-24
Urmila, for logical operations you typically need two inputs, e.g., xor(1,0). In your example xor(p(i)) it looks like you only have one (at a time). Do you mean
Q(l) = xor(p(i),p(l))
Urmila
2014-2-24
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Discrete Math 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!