How to convert unit8 number to a double number using matlab function? I have use
ID: 2293565 • Letter: H
Question
How to convert unit8 number to a double number using matlab function? I have used the double ( ) function but it doesn’t work! I might used it wrong??!! Or is there any different function for converting? How to convert unit8 number to a double number using matlab function? I have used the double ( ) function but it doesn’t work! I might used it wrong??!! Or is there any different function for converting? I have used the double ( ) function but it doesn’t work! I might used it wrong??!! Or is there any different function for converting?Explanation / Answer
Actually its uint8 not unit8. Which means unsigned integer of 8 bits. So the maximum value uint8 can accept is 255 (2^8-1 = 255);
Try the following code in your PC.
a=uint8(215)
b=double(a)
whos
Result:
Name Size Bytes Class Attributes
a 1x1 1 uint8
b 1x1 8 double
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.