convert binary string into hex
이전 댓글 표시
i need to convert this binary string [ '0101010011101010'] into hex or decimal
but in 2^4 mean (i need to convert 4bit by 4bit) not all number
채택된 답변
추가 답변 (1개)
str = '0101010011101010';
fun = @(s)dec2hex(bin2dec(s));
out = regexprep(str,'.{1,4}(?=(.{4})*$)','${fun($&)}')
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!