MATLAB: How to create a black image

create image

how can i create a black image, not a gray one?

Best Answer

Can you use imshow?
If you have to use imagesc, keep in mind that an image has to have values for R, G and B for each pixel. That means you matrix needs to be 256x64x3.
Try using imagesc with this
img=zeros(256,64,3,'uint8');
Related Question