⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bgcond.m

📁 生成三维模型异常体填充文件
💻 M
字号:
function sb = bgcond(h,sig,x,y,z)

% ----------------------------------------------
% Computing background conductivity in the mesh
% ----------------------------------------------
%
% h       : vector of layer thicknesses, [] for halfspace
% sig     : vector of layer conductivities
% x	  : vector of the x coordinates of the mesh
% y	  : vector of the y coordinates of the mesh
% z	  : vector of the z coordinates of the mesh
% sb	  : Nxyz,1 vector of background conductivity

h = (h(:))';
Nx=length(x); Ny=length(y); Nz=length(z);
Nxyz=Nx*Ny*Nz;
nl = length(sig);

h=[0 h inf];

zbnd=zeros(1,length(h));
zbnd(1)=h(1);
for i=2:length(h)
   zbnd(i)=zbnd(i-1)+h(i);
end

sb = zeros(0,1);
for i=1:nl
   ind = find((z>zbnd(i)) & (z<zbnd(i+1)));
   numc=length(ind)*Nx*Ny;
   sb=[sb;sig(i)*ones(numc,1)];
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -