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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Testing Frameworks에 대해 자세히 알아보기

제품

릴리스

R2020a

태그

질문:

2020년 9월 28일

댓글:

2020년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by