Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
6 と 7 のバイナリ表現を組み合わせる必要があります。
bin1 = fliplr(de2bi(6)); bin2 = fliplr(de2bi(7)); bin1 = 1 1 0 bin2 = 1 1 1
組み合わせの後、番号は
bin3 = 110111
これを行う方法について誰か考えがありますか?
示唆されているように、それらを連結することができます
bin3 = [bin1, bin2]
ただし、本当にスペースを入れずにまとめたい場合は、次のようにすることができます。
bin3 = num2str([bin1, bin2]); bin3 = bin3(bin3 ~= ' ')
それらを今すぐ数値に変換したい場合は、使用できますstr2num()
str2num()