function [X,Y,C]=open_single_dat_file(filename)

Nx=201;
Ny=101;

n_lines=Nx*Ny;

fid=fopen(filename);

X=0*(1:n_lines);
Y=0*(1:n_lines);
C=0*(1:n_lines);

for i=1:n_lines
    c1=fgetl(fid);
    vec_temp=sscanf(c1,'%f');
    x_temp=vec_temp(1);
    y_temp=vec_temp(2);
    C_temp=vec_temp(3);
    
    X(i)=x_temp;
    Y(i)=y_temp;
    C(i)=C_temp;
end

X=reshape(X,Nx,Ny);
Y=reshape(Y,Nx,Ny);
C=reshape(C,Nx,Ny);

fclose(fid);
    
end