I have my data in 3 columns, denoting the values of the x, y and z coordinates respectively. The x and y points are on a grid (may be non-uniform, as here):
x y z
1 1 5
1 2 7
1 3 0
3 1 6
3 2 9
3 3 5
7 1 4
7 2 0
7 3 8
Now I want to use a MATLAB function like pcolor
to make a 2D color plot of this data where the z
values will be denoted by color. Unfortunately pcolor
wants the data for the x
and y
coordinates either as vectors or as grid matrices, and the z
data also in the form of a grid matrix, and will not except column data of this form.
I don't want to use any fitting or interpolation. I only want to rearrange the data I have here. How can I attain this?
[x,y]
structure, you'd need something else entirely to makepcolor
work, see my answer below – Adriaan