资源简介
该程序用于地震波剖面图的形成,是地震信号处理必不可少的程序
代码片段和文件信息
function wigb(ascalxzamx)
%WIGB: Plot seismic data using wiggles
%
% WIGB(ascalxzamx)
%
% IN a: seismic data
% scale: multiple data by scale
% x: x-axis;
% z: vertical axis (time or depth)
% x and z are vectors with offset and time.
%
% If only ‘a‘ is enter ‘scalxzamnamx‘ are decided automatically;
% otherwise ‘scal‘ is a scalar; ‘x z‘ are vectors for annotation in
% offset and time amx are the amplitude range.
%
% Author:
% Xingong Li Dec. 1995
% Changes:
% Jun111997: add amx
% May161997: updated for v5 - add ‘zeros line‘ to background color
% May171996: if scal ==0 plot without scaling
% Aug6 1996: if max(tr)==0 plot a line
if nargin == 0 nx=10;nz=10; a = rand(nznx)-0.5; end;
% 不输入数据时的情况
[nznx]=size(a);
%地震数据a的行和列
trmx= max(abs(a));
%求数据a矩阵每列的最大值,若a是复数,需要先使用绝对值,然后生成一个行向量
if (nargin <= 4); amx=mean(trmx); end;
%当输入参数小于等于4,时trmx为一个行向量,amx默认为trmx的平均值
if (nargin <= 2); x=[1:nx]; z=[1:nz]; end;
%当输入参数小于等于2时,X轴范围为1:nx;z轴范围为1:nz;
if (nargin <= 1); scal =1; end;
%当输入参数个数小于等于1个时,scal默认为1
if nx <= 1; disp(‘ ERR:PlotWig: nx has to be more than 1‘);return;end;
%如果地震数据a的列小于等于1,错误。
% take the average as dx
dx1 = abs(x(2:nx)-x(1:nx-1));
dx = median(dx1);
%median为中值,dx为全是1的行向量;
dz=z(2)-z(1);
xmx=max(max(a)); xmn=min(min(a));
%求取数据矩阵a的最大值和最小值
if scal == 0; scal=1; end;
a = a * dx /amx;
a = a * scal;
%将归一化a与缩放因子乘积
fprintf(‘ PlotWig: data range [%f %f] plotted max %f \n‘xmnxmxamx);
% set display range
x1=min(x)-2.0*dx; x2=max(x)+2.0*dx;
z1=
- 上一篇:倾斜界面求波的反透射系数matlab
- 下一篇:对数极坐标变换matlab程序
评论
共有 条评论