1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| function [] = SyntheticSeismic() clc; clear; close all;
ref=zeros(1,500); ref(100)=0.5; ref(200)=-0.6; ref(300)=0.7; ref(400)=0.3; ref(500)=0.4;
[wavelet_zero,timez] = Ricker_zero(20,0.002,100,3); [wavelet_min,timem] = Ricker_minimum(20,0.002,100,3);
SeisRecord_zero = conv(ref,wavelet_zero); SeisRecord_min = conv(ref,wavelet_min);
x1=1:length(ref)+length(wavelet_zero)-1; x2=1:length(ref)+length(wavelet_min)-1; subplot(4,1,1) plot(timez,wavelet_zero,'b',timem,wavelet_min,'r:','linewidth',2.0); title('Ricker Wavelet','FontSize',14); legend('Ricker-zero','Ricker-minimum'); set(gca,'FontSize',12,'XLim',[0 0.1],'YLim',[-1.0 1.0]); xlabel('Time(s)'),ylabel('Amplitude') hold on subplot(4,1,2) x3=1:length(ref); stem(x3,ref,'k');xlabel('depth'),ylabel('value') title('Reflection Coefficient','FontSize',14); axis([-inf inf -1,1]); set(gca,'FontSize',12); grid on; hold on subplot(4,1,[3,4]) plot(x1,SeisRecord_zero,'b',x2,SeisRecord_min,'r:','linewidth',2.0);
text(50,0.6,'Seismic Record','FontSize',15); legend('Record(Ricker-zero)','Record(Ricker-minimum)'); set(gca,'FontSize',12,'YLim',[-0.75 0.75]); xlabel('sampling sequence'),ylabel('Amplitude') set(gcf,'unit','normalized','position',[0.1,0.0,0.5,0.9]);
function [wavelet_zero,time]=Ricker_zero(freqs,dt,nt,r)
tmin=0; tmax=dt*nt; time=tmin:dt:tmax; wavelet_zero=exp(-(2*pi*freqs/r)^2*time.^2).*cos(2*pi*freqs.*time); end
function [wavelet_min,time]=Ricker_minimum(freqs,dt,nt,r)
tmin=0; tmax=dt*nt; time=tmin:dt:tmax; wavelet_min=exp(-(2*pi*freqs/r)^2*time.^2).*sin(2*pi*freqs.*time); end
end
|