decimal matrix to binary matrix
Show older comments
How can i convert decimal value of a matrix to binary value with corect position?
Answers (1)
Mischa Kim
on 7 Apr 2014
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 Comment
Fouad BOUDJIRA
on 12 Feb 2019
but this gives a cell input , that wont work with fprntf function !!!!!
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!