MATLAB: MATLAB: 2-D plot with z-axis given in color

colormapcolorplotfor loopplot

Best Answer

I am not certain exactly what you want to do, but it would seem to be ideal for the contour function. You can also use surf with the appropriate view setting. (Experiment with that interactively.) I would experiment with image rather than pcolor, because pcolor treats your values as the edges of the segments (so you get one fewer of them in each dimension) rather than the centres.
(Indeed your Question is not spam, so I removed that. The spam filter isn’t perfect.)