function wigb(a,scal,x,z,amx)
%WIGB: Plot seismic data using wiggles.
%
% WIGB(a,scal,x,z,amx)
%
% IN a: seismic data (a matrix, traces are columns)
% scale: multiple data by scal
% x: horizontal axis (often offset)
% z: vertical axis (often time)
%
% Note
%
% If only 'a' is enter, 'scal,x,z,amn,amx' are set automatically;
% otherwise, 'scal' is a scalar; 'x, z' are vectors for annotation in
% offset and time, amx are the amplitude range.
%
%
% Author(s): Xingong Li (Intseis, Integrated Seismic Solutions)
% Copyright 1998-2003 Xingong
% Revision: 1.2 Date: Dec/2002
%
if nargin == 0, nx=10;nz=10; a = rand(nz,nx)-0.5; end;
[nz,nx]=size(a);
trmx= max(abs(a));
if (nargin <= 4); amx=mean(trmx); end;
if (nargin <= 2); x=[1:nx]; z=[1:nz]; end;
if (nargin <= 1); scal =1; end;
if nx <= 1; disp(' ERR:PlotWig: nx has to be more than 1');return;end;
% take the average as dx
dx1 = abs(x(2:nx)-x(1:nx-1));
dx = median(dx1);
dz=z(2)-z(1);
xmx=max(max(a)); xmn=min(min(a));
if scal == 0; scal=1; end;
a = a * dx /amx;
a = a * scal;
fprintf(' PlotWig: data range [%f, %f], plotted max %f \n',xmn,xmx,amx);
% set display range
x1=min(x)-2.0*dx; x2=max(x)+2.0*dx;
z1=min(z)-dz; z2=max(z)+dz;
set(gca,'NextPlot','add','Box','on', ...
'XLim', [x1 x2], ...
'YDir','reverse', ...
'YLim',[z1 z2]);
fillcolor = [0 0 0];
linecolor = [0 0 0];
linewidth = 1.;
z=z'; % input as row vector
zstart=z(1);
zend =z(nz);
for i=1:nx,
if trmx(i) ~= 0; % skip the zero traces
tr=a(:,i); % --- one scale for all section
s = sign(tr) ;
i1= find( s(1:nz-1) ~= s(2:nz) ); % zero crossing points
npos = length(i1);
%12/7/97
zadd = i1 + tr(i1) ./ (tr(i1) - tr(i1+1)); %locations with 0 amplitudes
aadd = zeros(size(zadd));
[zpos,vpos] = find(tr >0);
[zz,iz] = sort([zpos; zadd]); % indices of zero point plus positives
aa = [tr(zpos); aadd];
aa = aa(iz);
% be careful at the ends
if tr(1)>0, a0=0; z0=1.00;
else, a0=0; z0=zadd(1);
end;
if tr(nz)>0, a1=0; z1=nz;
else, a1=0; z1=max(zadd);
end;
zz = [z0; zz; z1; z0];
aa = [a0; aa; a1; a0];
zzz = zstart + zz*dz -dz;
patch( aa+x(i) , zzz, fillcolor);
line( 'Color',[1 1 1],'EraseMode','background', ...
'Xdata', x(i)+[0 0], 'Ydata',[zstart zend]); % remove zero line
%'LineWidth',linewidth, ...
%12/7/97 'Xdata', x(i)+[0 0], 'Ydata',[z0 z1]*dz); % remove zero line
line( 'Color',linecolor,'EraseMode','background', ...
'LineWidth',linewidth, ...
'Xdata', tr+x(i), 'Ydata',z); % negatives line
else % zeros trace
line( 'Color',linecolor,'EraseMode','background', ...
'LineWidth',linewidth, ...
'Xdata', [x(i) x(i)], 'Ydata',[zstart zend]);
end;
end;
KL变换的Matlab实现
5星 · 超过95%的资源 需积分: 49 12 浏览量
2011-03-07
22:55:38
上传
评论 8
收藏 5KB RAR 举报
xmfch
- 粉丝: 1
- 资源: 6
最新资源
- 基于yolov5识别算法实现的DNF自动脚本源码.zip
- 基于Python实现的自动化办公项目.zip
- 基于python实现的基于PyQt5和爬虫的小说阅读系统.zip
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
前往页