How to apply dec2bin to char array?
显示 更早的评论
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 个评论
a ='1234567';
b = dec2bin(str2double(a))
采纳的回答
更多回答(1 个)
a ='1234567';
dec2bin(str2num(a))
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!