Introduction - If you have any usage issues, please Google them yourself
The data used in the matrix type is double. So you can statement I2 = im2double (I1) converting the image into an array of double precision type I1 if you do not convert on uint8 addition and subtraction will produce an overflow, possibly suggesting that the error is: Function ' *' is not defined for values of class ' uint8'