sticking together 4 hex bytes question
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello I have four DECIMAL numer for example 31(1F) 47(2F) 63(3F) FF(255)
how using those decimal numbers i get a HEX number of 1F2F3FFF?
Thanks.
0 Kommentare
Antworten (2)
Ameer Hamza
am 1 Nov. 2020
Bearbeitet: Ameer Hamza
am 1 Nov. 2020
Try this code
x = [31 47 63 255];
y = reshape(dec2hex(x).', 1, [])
Result
>> y
y =
'1F2F3FFF'
6 Kommentare
Ameer Hamza
am 1 Nov. 2020
I think it is better you run the following lines one by one. Then you will get an idea of what is happening
x = [31 47 63 255];
y = dec2hex(x)
y = y.'
y = reshape(y, 1, [])
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!