How to apply dec2bin to char array?
Show older comments
I have a data as char
a ='1234567';
dec2bin(a) gives
6×6 char array
'110001'
'110010'
'110011'
'110100'
'110101'
'110110'
but I want the result like dec2bin(123456)= '11110001001000000'
How to apply dec2bin to a char value to get a sinle out put ?
1 Comment
a ='1234567';
b = dec2bin(str2double(a))
Accepted Answer
More Answers (1)
a ='1234567';
dec2bin(str2num(a))
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!