string of binary to letters??

2 次查看(过去 30 天)
Hi
This is my code:
bin
for i=1:size(bin,1)
for j=1:size(bin,2)
mot=num2str(bin(i,j));
bina(i,j)=mot;
end
end
bina
____________________________________________________________________________________________________________________
bin =
1 1 1 0 1 0 0
1 1 0 1 0 0 0
bina =
1110100
1101000
I want to convert this 'bina' or the 'bin' into the initial letters, which are "th". How can i do that?
Thank you

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-6-9
编辑:Azzi Abdelmalek 2015-6-9
bin=[0 0 1 0 1 0;1 0 0 1 0 1]
a=cellstr(num2str(bin)),
bina=strrep(a,' ','')

更多回答(1 个)

James Tursa
James Tursa 2015-6-9
char(bin2dec(char(bin+'0')))'

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by