converting binary to string
14 ビュー (過去 30 日間)
古いコメントを表示
hi, im having trouble with finding the string at the end of the code. the error seems to be in the last part. can you please help me resolve it?
stream_n = reshape (msg_error_checked', n, [])';
info_stream = stream_n (:, 1: k);
question = dec2bin (char (info_stream'+ '0' ));
real = '';
%%real = strcat( real,char(bi2de(question,'left-msb')));
1 件のコメント
Sanjay Ravichandran
2020 年 5 月 23 日
This is a extension of my question:
https://www.mathworks.com/matlabcentral/answers/531318-converting-binary-characters-into-a-char-error?s_tid=prof_contriblnk
回答 (1 件)
Ameer Hamza
2020 年 5 月 23 日
編集済み: Ameer Hamza
2020 年 5 月 23 日
Something like this?
x = [1 0 0 1 1 1 0 0 1 1];
y = strrep(num2str(x), ' ', '')
Result
y =
'1001110011'
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!