Storing an int16 number into two int8 number
12 次查看(过去 30 天)
显示 更早的评论
Hi All
I am new to use Matlab, and I have question regarding the data type.
I have create an array of type int8, to represent a string of byte(8 bits) in a communication channel. Some of the data written into this array may take 2 bytes, i.e number greater than 127.
So my question is, let say I have created an array of int8 of length 8, and I would like to store the number 600 in binary format in the cell 3 and 4 in this array, how to do it please?
The result I am expecting is Data = [00 00 02 58 00 00 00 00] (in Hex representation)
Thanks in advance Regards Victor
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!