how the function typecast works when convert double to uint8
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yucheng Fu
am 31 Aug. 2015
Kommentiert: Yucheng Fu
am 2 Sep. 2015
I test the function typecast as follows:
z=double(1);
z1=typecast(z,'uint8');
and the results shows the
z1 = 0 0 0 0 0 0 240 63
As to my knowledge, each element in z1 should represent one 8-bit unsigned number. But the sum is not equal to 1.
Does anyone know how the function works and what's the meaning in vector z1?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numeric Types 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!