How I can Convert Decimal number into binary number then to matrix binary number ?
2 views (last 30 days)
Show older comments
Abduellah Elbakoush
on 21 Dec 2021
Commented: Stephen23
on 21 Dec 2021
e,g I have 128125
i want convert to 01 1111 0100 0111 1000
then convert to 01
11
11
01
00
01
11
10
00
1 Comment
Accepted Answer
John D'Errico
on 21 Dec 2021
Easy peasey.
B = dec2bin(123125)
B = [repmat('0',rem(length(B),2)),B]
reshape(B,2,[])'
2 Comments
Walter Roberson
on 21 Dec 2021
B = dec2bin(123125)
B = [repmat('0',rem(length(B),2)),B]
reshape(B,2,[])' - '0'
More Answers (0)
See Also
Categories
Find more on Data Type Conversion 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!