Azzera filtri
Azzera filtri

bit reversal in a Vector

2 visualizzazioni (ultimi 30 giorni)
Sadia
Sadia il 25 Dic 2012
i want to take a NOT of one bit in a vector and then restore that bit in the same vector.e.g.
a=[0 1 1 0]
what i need is:
a=[0 0 1 0]
Any ideas??

Risposta accettata

Matt J
Matt J il 25 Dic 2012
a(2)=~a(2);

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by