Solved it myself. It can be done easily by converting back to decimal from Galois Field, reshaping into n x 2 matrix and adding the columns.
Convert binary integers to quaternary integers
조회 수: 3 (최근 30일)
이전 댓글 표시
Is it possible to convert binary integers generated using a randi() to quaternary integers (0-3) by taking two bits from the source and combining them?
댓글 수: 0
채택된 답변
추가 답변 (1개)
Walter Roberson
2012년 5월 17일
Yes. B1*2 + B2
댓글 수: 2
Walter Roberson
2012년 5월 17일
If you need to, put the 4 possible results into a vector, and index the vector at B1*2 + B2 + 1
참고 항목
카테고리
Help Center 및 File Exchange에서 Error Detection and Correction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!