Digital image processing – MATLAB

How to change dpi of an image? And how to change Gray level image?