フィルターのクリア

Testing vector for parity bits

1 回表示 (過去 30 日間)
David Jones
David Jones 2020 年 9 月 28 日
コメント済み: Ameer Hamza 2020 年 9 月 29 日
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

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 9 月 28 日
編集済み: Ameer Hamza 2020 年 9 月 28 日
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 件のコメント
David Jones
David Jones 2020 年 9 月 29 日
Thank you fro your help
Ameer Hamza
Ameer Hamza 2020 年 9 月 29 日
I am glad to be of help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by