MATLAB: How to display a vector as colorplot of to other vectors

plottingvectors

Hi, I couldn't figure that one out myself, so hopefully somebody has a solution.
I have three vectors X, Y, and Z of same dimension, so that Z(k) is a height for horizontal coordinates (X(k),Y(k)). I want to display Z as a color plot over the horizontal area that encompasses all coordinate pairs of X and Y. All functions I know (pcolor, surf, etc) require Z to be a matrix which is not really feasible due to memory problems since the vectors are quite large (appr. 250000 elements). Also, the horizontal coordinates are not on a regular grid but more like a point cloud.
Any idea how to display the data as it is would be appreciated.
Cheers, Peter

Best Answer

If you have a point cloud, the scatter3 or plot3 functions would work. There are a number of options for coloring the points.
If you want to grid them at some point, see if scatteredInterpolant will do what you want.