Testing vector for parity bits
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
David Jones
il 28 Set 2020
Commentato: Ameer Hamza
il 29 Set 2020
Hi
I have 55 bits in a vector I need to test for parity, the first 4 bits are the data the 5 bit is the parity bit this reapeats 11 times, can anyone please help me to extract and test the data blocks.
Thank You
David
0 Commenti
Risposta accettata
Ameer Hamza
il 28 Set 2020
Modificato: Ameer Hamza
il 28 Set 2020
Try something like this
x = % 55 element vector
x_new = reshape(x, 5, []).';
data = x_new(:, 1:4);
parity = x_new(:, 4);
Each row in 'data' contains for bits, and their corresponding parity is stored in 'parity'.
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Hypothesis Tests 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!