decimal matrix to binary matrix

How can i convert decimal value of a matrix to binary value with corect position?

답변 (1개)

Mischa Kim
Mischa Kim 2014년 4월 7일

0 개 추천

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
Fouad BOUDJIRA 2019년 2월 12일
but this gives a cell input , that wont work with fprntf function !!!!!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2014년 4월 7일

댓글:

2019년 2월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by