MATLAB: Floating point number in one pixel of image

image processingImage Processing Toolbox

hi I want to put a floating point number(e.g. 2.4598) in one pixel of image. is it possible? how? thanks

Best Answer

Yes, cast it to double, if it's not already, then assign it
grayImage = double(grayImage);
grayImage(row, column) = 2.4598;
% If you want to show it, use the [] option in imshow():
imshow(grayImage, []);