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!