I found this solution, but its quik and dirty:
z = zeros(3,3,3);
z(2,2,2) = 1;
x=[];
y=[];
z=[];
for c = 1:size(z,3)
for b = 1:size(z,2)
for a = 1:size(z,1)
x(end+1) = a;
y(end+1) = b;
z(end+1) = c;
end
end
end
scatter3(x,y,z,50,z(:));