decimal matrix to binary matrix
显示 更早的评论
How can i convert decimal value of a matrix to binary value with corect position?
回答(1 个)
Mischa Kim
2014-4-7
Kiran, try
B = arrayfun(@(ii,jj) {dec2bin(A(ii,jj))},repmat((1:size(A,1))',1,size(A,2)),repmat((1:size(A,2)),size(A,1),1));
1 个评论
Fouad BOUDJIRA
2019-2-12
but this gives a cell input , that wont work with fprntf function !!!!!
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!