How to convolve a wavelet with a signal to make a wedge model?
4 次查看(过去 30 天)
显示 更早的评论
I would appreciate if anyone can help me as I am new in MATLANB :(.
I have a signal and I want to convolve it with a wavelet and make a wedge mode. It is a seismic wedge model.Appreciated in advance!
My wavelet code is:
%.............................................
fr=30;% frequency
dt=.002;
T=0.1;
tt=-T:dt:T;
tsh=0.008;%time shifting
tr=round(length(tt)/2);
t=tt(tr:end);
zpr=(1-tt.^2*fr^2*pi^2).*exp(-tt.^2*pi^2*fr^2);%zero-phase ricker
figure(10)
plot(zpr)
%................................................
My signal is:
%...............................................
data=xlsread('1');
amp=data(:,2);%us/f
time=data(:,1);%ms
tim=time(1:1:end);
am=amp(1:1:end);
len=length(tim);
for i=1:len
if am(i)==-999.25
am(i)=am(i-1);
end
end
data1=zeros(len,2);
tti=round(tim);
for j=2:len
r(j)=(am(j)-am(j-1))/(am(j)+am(j-1));% reflection coefficients
end
plot(r)
0 个评论
采纳的回答
Afshin Aghayan
2021-1-27
I wrote the following code a long time ago (2011) that can create seismic events based on their slope like wedge model. I hope it can be useful for you.
% This function diplays siemic events based on slope
clc
number=input('How maney events do you want to see? ');
x=input('Enter number of traces : ');
d=input('Enter trace interval in m : ');
t=input('Enter maximum recording time in ms : ');
f=input('Enter frequency of the Ricker wavelet (Hz) : ');
% Ricker wavelet equal ricker=(1-2(pi*f*t)^2)*exp(-(pi*f*t)^2))
n=(0:100);
wavelet=(1-2*(pi*f*(n-50)*0.001).^2).*exp(-(pi*f*(n-50)*0.001).^2);
% Creating the impedance matrix
ImpMatrix=zeros(t,x);
for num=1:number
slope=input(['Enter slope of the event#' num2str(num) ' in degree (e.g. 0 means horizontal line) : ']);
t0=input(['Enter start time of the event#' num2str(num) ' in ms : ']);
if t0==0; t0=1; end % In the case t0=0, we assume that the event is recorded at the first sample
for i=1:x
k=d*i;
t1=k*tand(slope)+t0;
if ceil(t1)<=t && ceil(t1)>0
ImpMatrix(ceil(t1),i)=1;
end
end
end
fieldCon=conv2(ImpMatrix,wavelet','same');
field=fieldCon(1:t,:);
%================================Display===================================
if exist('wigb') == 2 % check wigb function exists
figure, wigb(field);
ylabel('Time (ms)'), xlabel('Trace no.')
ylim([1 t])
end
figure,imagesc(field)
ylabel('Time (ms)'), xlabel('Trace no.')
% Afshin Aghayan
% 2011
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!