Hi Saleh,
It seems that you would like to plot a 3D plot out of the image. Please note that an image itself can be represented in 3D by assuming that the image is a function of x and y mapped to a 3rd dimension z. You can use surf plot or imagesc to view such a 3D plot.
For more information kindly go through the following link.
Further, if your objective is to create an image stack, please refer the following link.
https://in.mathworks.com/matlabcentral/answers/78009-create-an-image-stack-3-d-matrix
with regards,
Gokul Nath S J