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

📄 cell_centre.m

📁 3D电阻率反演Matlab程序 RESINVM3D is a MATLAB package for inverting 3D Dc Resistivity and Electrical Resi
💻 M
字号:
function [xc,yc,zc] = cell_centre(dx,dy,dz);
%%[xc,yc,zc] = cell_centre(dx,dy,dz);
%%Finds the LH coordsystem cartesian coords of the cell centers;

% Copyright (c) 2007 by the Society of Exploration Geophysicists.
% For more information, go to http://software.seg.org/2007/0001 .
% You must read and accept usage terms at:
% http://software.seg.org/disclaimer.txt before use.
% 
% Revision history:
% Original SEG version by Adam Pidlisecky and Eldad Haber
% Last update, July 2005

%calculate the cartesian cell centered grid for inversion
dx = mkvc(dx);
dy = mkvc(dy);
dz = mkvc(dz);
%build the 3d grid - numbered from 0 to maximum extent
z = [0; cumsum(dz)];
x = [0; cumsum(dx)];
y = [0; cumsum(dy)];

%Center the grid about zero
x = shiftdim(x) - max(x)/2;
y = shiftdim(y) - max(y)/2;

%z = shiftdim(z) - max(z)/2;
%Set surface to Z = 0
z= shiftdim(z);

%find the cell centers
xc = x(1:end-1) +dx/2;
yc = y(1:end-1) +dy/2;
zc = z(1:end-1) +dz/2;

⌨️ 快捷键说明

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