浅水域直流电法勘探在水下地层结构勘察中有较好效果,采用手工绘图的方式处理直流电法数据存在较大误差。利用matlab语言编辑了简易的直流电法数据智能解译的程序,并实现直流电法数据的可视化,代码没有优化,仅供参考。
传统的方法是在ACAD中输入数据,手工描图,成图效率慢且精度不高。采用程序可以一键成图,二维剖面如下:
如果现场采集了多条测线的数据,可以将多条测线数据集合成数据体,实现三维成图。成图效果如下:
close all
clear
clc
y = [2,4,7,10,15,20];
% y = 1:6;
y = y';
yy = repmat(y,1,12);
x = [0,3,4,5,6,11,14,15,17,18,19,20];
xx = repmat(x,6,1);
zz = [21.6 25.1 14.7 21.5 19.9 23.9 30.1 31.6 18.4 21.1 19.4 17.6
28.7 17.1 17.3 19.8 17.8 22.4 36.5 43.1 33.5 34.6 33.9 31.5
21.6 18.7 23.8 24.2 16.5 21.1 37.7 47.8 46.1 42.1 43.7 42.7
25.4 28.4 36.2 32.3 19.2 20.6 38.1 51 49.9 47.2 49.1 47.8
45.2 25.6 30.8 45.9 27.2 25.9 37.6 62.8 60.3 60 64 61.7
55.2 19.5 28.5 54.3 32.7 28.7 43.1 73.5 74.2 72.1 77.2 76.1];
% zz1 = [29.6 19.2 32.8 33.3 30.1 31.8 36.1 32.2
% 31.2 19.4 22.7 21.6 19.3 33.4 42.2 41.6
% 21.1 19.7 20.8 17.1 18.8 34.8 46.1 48.7
% 23.5 27.1 26.6 20.8 20.2 36.9 48.7 54.6
% 31.2 24.8 37.9 31.2 26.6 44.8 59.1 68.4
% 33.1 26.5 47.4 40.2 32.3 53.3 70.4 82.4];
%
% zz2 = [18.2 16.4 20.8 23.3 5.4 8.1 7.1 27.3
% 27.8 21.5 21.2 24.2 22.6 22.8 25.9 30.3
% 24.3 26.3 28.6 24.7 22.0 24.2 29.2 34.8
% 29.1 38.7 41.1 27.4 19.8 23.5 27.4 33.7
% 48.1 43.5 45.0 32.6 21.6 25.7 37.2 42.9
% 55.1 69.4 55.4 44.7 34.8 37.9 53.8 62.2];
%
% zz3 = [13.4 22.8 27.5 33.6 36.6 26.7 23.6 24.9
% 21.4 27.5 30.6 24.8 33.5 33.6 34.0 33.5
% 26.4 28.0 25.4 19.7 32.2 36.2 36.5 36.1
% 34.6 31.6 29.4 16.7 29.1 37.2 38.1 37.5
% 26.8 24.0 21.6 13.5 21.2 21.4 26.4 24.7
% 23.6 23.1 20.2 13.0 20.8 21.0 25.7 21.1];
%
% zz4 = [21.6 25.1 14.7 21.5 19.9 23.9 30.1 31.6
% 28.7 17.1 17.3 19.8 17.8 22.4 36.5 43.1
% 21.6 18.7 23.8 24.2 16.5 21.1 37.7 47.8
% 25.4 28.4 36.2 32.3 19.2 20.6 38.1 51
% 45.2 25.6 30.8 45.9 27.2 25.9 37.6 62.8
% 55.2 19.5 28.5 54.3 32.7 28.7 43.1 73.5];
%
% zz = ones(6,8,4);
% zz(:,:,1) = zz1;
% zz(:,:,2) = zz2;
% zz(:,:,3) = zz3;
% zz(:,:,4) = zz4;
%
%
% figure(1);
% xslice = [];
% yslice = [];
% zslice = 1:1:4;
% [x,y,z] = meshgrid(1:6,1:8,1:4);
% S = slice(zz,xslice,yslice,zslice);
% set(gca,'zdir','reverse');
% % nd = linspace(0,nz,7);
% set(gca,'ZMinorTick','off');
% % set(gca,'ztick',[0 10 20 30 40 50 60]);
% % set(gca,'ztick',nd);
% % set(gca,'zticklabel',{'0','10','20','30','40','50','60'});
% xlabel('测线长度(m)','Interpreter','none');
% ylabel('深度(m)','Interpreter','none');
% zlabel('测线间距(m)');
% colormap(jet);
% % colorbar
% % lim = caxis;
% % caxis([-0.5 0.5]);
% alpha(0.8);
% % alpha('color');
% % alphamap('vdown');
% % alphamap('decrease',.2);
% shading interp
% % toc
[xq,yq] = meshgrid(...
linspace(min(min(xx,[],2)),max(max(xx,[],2)),50),...
linspace(min(min(yy,[],1)),max(max(yy,[],1)),50 )...
);
zq = griddata(xx,yy,zz,xq,yq,'cubic');
[C,h] = contourf(xq,yq,zq,20,'showtext','on');
% [C,h] = contourf(xq,yq,zq,100,'linecolor','none');
shading interp
h.LevelList=round(h.LevelList,0); %rounds levels to 1 decimal place
clabel(C,h);
xlabel('测线长度(m)');
ylabel('深度(m)');
colormap(jet);
set(gca,'ydir','reverse');
axis equal