Storing an int16 number into two int8 number
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!