Usman YousafZai
Usman YousafZai

Reputation: 1120

Conversion to unit8 data class in MATLAB

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'.

Upvotes: 0

Views: 583

Answers (1)

Usman YousafZai
Usman YousafZai

Reputation: 1120

It is spelling Mistake. it is uint8 not unit8

Upvotes: 1

Related Questions