数据整理、格式转换、计算
生成反演的单元体网格空间
clc;
clear;
X_min = 89.5;
X_max = 140.5;
dx = 1;
Y_min = -10.5;
Y_max = 35.5;
dy = 1;
Z_min = -20;
Z_max = -800;
dz = 20;
data_top_depth = load('XXXX.dat');
horizontal_layers_depth = -20;
output = fopen('XXXXX.dat','w');
for i = 1:length(data_top_depth)
fprintf(output,'%f %f %f %f \n',data_top_depth(i,1),data_top_depth(i,2),-(data_top_depth(i,3)-horizontal_layers_depth)/2,abs((-horizontal_layers_depth)-data_top_depth(i,3)));
end
for z = Z_min-dz:-dz:Z_max
for y = Y_min:dy:Y_max
for x = X_min:dx:X_max
fprintf(output,'%f %f %f %f \n',x,y,z+(dz/2),dz);
end
end
end
fclose(output);