how to convert the decimal array into binary equivalent

1 vue (au cours des 30 derniers jours)
Neethu
Neethu le 23 Mar 2015
Modifié(e) : Neethu le 31 Mar 2015
I have a 200X8 matrix of decimal values. I want to convert each element of the matrix into 8 bit binary form. I wrote the code as follows. But the following error is occurred. Assignment has more non-singleton rhs dimensions than non-singleton subscripts. please help me to find the bianry of each element.
con=char(zeros(1600,8));
for j=1:1600
Q=dec2bin(new(1,j),8);
con(j,8)=Q;
end
where new is the decimal matrix

Réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by