function [data] = openFile()
[file, path] = uigetfile('*.*', 'Select an ASCII file to open');
if isequal(file, 0) || isequal(path, 0)
disp('No file selected.');
fullFilePath = fullfile(path, file);
data = readtable(fullFilePath, 'FileType', 'text');
disp(['Successfully loaded file: ' fullFilePath]);
disp('Error reading the file.');
V = data.velocity_magnitude;
Tw = dataWall.temperature;
Xw = dataWall.x_coordinate;
Yw = dataWall.y_coordinate;
um(i) = trapz(y(x==xnew(i)),V(x==xnew(i)))./h;
Tm(i) = trapz(y(x==xnew(i)),TV(x==xnew(i)))./(um(i)*h);
Tw_new1 = sortrows(Tw_new,1);
Numean = mean((hf*Dh)/k);
um(i) = trapz(yf(xf==x_newF(i)),Vf(xf==x_newF(i)))./h;
TmF(i) = trapz(yf(xf==x_newF(i)),TVf(xf==x_newF(i)))./(um(i)*h);
Tw_new1F = sortrows(Tw_newF,1);
X_set(:,2) = min(x)+0.005:0.01:max(x)+0.005;
X_set(:,1) = min(x):0.01:max(x);
Mx_up=[]; My_up=[];Mx_down=[]; My_down=[];
vn_up=[];un_up=[];Tn_up=[];Pn_up=[];
vn_down=[];un_down=[];Tn_down=[];Pn_down=[];
x_new = linspace(X_set(i,1), X_set(i,2), desired_columns);
y_new = linspace(0, Y_max, desired_columns);
[Mx_up(:,:,i) My_up(:,:,i)] = meshgrid(x_new,y_new);
x_new = linspace(X_set(i,2),X_set(i+1,1), desired_columns);
y_new = linspace(0, Y_max, desired_columns);
[Mx_down(:,:,i) My_down(:,:,i)] = meshgrid(x_new,y_new);
vn_up=[]; un_up=[]; Pn_up=[]; Tn_up=[];
vn_down=[]; un_down=[]; Tn_down=[]; Pn_down=[];
for i = 1:length(X_set)-1
xn = x((X_set(i,2)>=x)&(x>=X_set(i,1))&(Y_max>=y)&(y>=Y_min));
yn = y((X_set(i,2)>=x)&(x>=X_set(i,1))&(Y_max>=y)&(y>=Y_min));
un = u((X_set(i,2)>=x)&(x>=X_set(i,1))&(Y_max>=y)&(y>=Y_min));
vn = v((X_set(i,2)>=x)&(x>=X_set(i,1))&(Y_max>=y)&(y>=Y_min));
Tn = T((X_set(i,2)>=x)&(x>=X_set(i,1))&(Y_max>=y)&(y>=Y_min));
Pn = P((X_set(i,2)>=x)&(x>=X_set(i,1))&(Y_max>=y)&(y>=Y_min));
vn_up(:,:,i) = griddata(xn,yn,vn,Mx_up(:,:,i), My_up(:,:,i),'cubic');
un_up(:,:,i) = griddata(xn,yn,un,Mx_up(:,:,i), My_up(:,:,i),'cubic');
Tn_up(:,:,i) = griddata(xn,yn,Tn,Mx_up(:,:,i), My_up(:,:,i),'cubic');
Pn_up(:,:,i) = griddata(xn,yn,Pn,Mx_up(:,:,i), My_up(:,:,i),'cubic');
xn = x((X_set(i+1,1)>=x)&(x>=X_set(i,2))&(Y_max>=y)&(y>=Y_min));
yn = y((X_set(i+1,1)>=x)&(x>=X_set(i,2))&(Y_max>=y)&(y>=Y_min));
un = u((X_set(i+1,1)>=x)&(x>=X_set(i,2))&(Y_max>=y)&(y>=Y_min));
vn = v((X_set(i+1,1)>=x)&(x>=X_set(i,2))&(Y_max>=y)&(y>=Y_min));
Tn = T((X_set(i+1,1)>=x)&(x>=X_set(i,2))&(Y_max>=y)&(y>=Y_min));
Pn = P((X_set(i+1,1)>=x)&(x>=X_set(i,2))&(Y_max>=y)&(y>=Y_min));
vn_down(:,:,i) = griddata(xn,yn,vn,Mx_down(:,:,i), My_down(:,:,i),'cubic');
un_down(:,:,i) = griddata(xn,yn,un,Mx_down(:,:,i), My_down(:,:,i),'cubic');
Pn_down(:,:,i) = griddata(xn,yn,Pn,Mx_down(:,:,i), My_down(:,:,i),'cubic');
Tn_down(:,:,i) = griddata(xn,yn,Tn,Mx_down(:,:,i), My_down(:,:,i),'cubic');