This question is very similar to this question. You might want to check it out.
Suppose you have a 3D matrix A:
A = rand(100,100,200);
You want to plot each entry of A mapped to a color at its 3D coordinates. First generate the coordinates:
[x,y,z] = meshgrid(1:100,1:100,1:200);
Now you are ready to use scatter3:
Here the : indexing vectorizes the coordinates column-wise.
Hope this helps.