0
votes

I am new to matlab in beginner phase. I want to know that

How to convert a (2*3) matrix having values out side the range [0 255] to an uint8?

I am trying to convert it to unit8 data class but it gives me the following error with the following syntax. B=unit8(A). where A is 2*3 Matrix values [4 5 6 ; 2 4 5]

error: Undefined function 'unit8' for input arguments of type 'double'.

1
It's uint8, not unit8. And how do you want to handle values greater than 255? They will be clipped when converting to uint8, is that what you want?Luis Mendo
mathworks.com/help/matlab/ref/uint8.html yeah it's a spelling error on your partDan
Yes thank You Brother.. It was spelling Mistake /Usman YousafZai

1 Answers

1
votes

It is spelling Mistake. it is uint8 not unit8