MATLAB: Convert txt file with 5 columns to plot a graph

plot graphstxt

I have a txt file, I wanted to convert to plot an image, the first column is the X axis, the second column is the Z axis, the third column is the X value, the fourth column is the Z value and the fifth column is the value of a pallet. The value of this pallet must change the color of the graph.
I would like to make a graph like this:
How can I do it? Thanks a lot

Best Answer

data = importdata("OLED.DFT_Ey_Convertido.txt") ;
x = data(:,1) ;
y = data(:,2) ;
nx = length(unique(x)) ;
ny = length(unique(y)) ;
X = reshape(x,nx,ny) ;
Y = reshape(y,nx,ny) ;
Z = reshape(data(:,3),nx,ny) ;
pcolor(X,Y,Z)
colorbar
shading interp