Geology Reference
In-Depth Information
% Bartlett
xx=complex(bartsignal);
y=fft(xx);
bartmag=2*abs(y);
bartmagcorrect=1.5*bartmag; % leakage correction
% Hann
xx=complex(hannsignal);
y=fft(xx);
hannmag=2*abs(y);
hannmagcorrect=1.6*hannmag; % leakage correction
% Create frequency scale and plot the three moduli
f1=0:1/nn:1/2;
f2=1/2-1/nn:-1/nn:1/nn;
f=cat(1,f1',-1*f2');
% Note: MATLAB plot.m arranges frequency scale from
min to max
figure;plot(f,mag);
hold all;plot(f,bartmagcorrect);
hold all;plot(f,hannmagcorrect);
Figure 4.11 Plotting the χ 2 n distribution for n = 1, 2, …, 20:
x = 0:0.2:100;
ychi=chisquare(x);
figure;plot(x,ychi);
Figure  4.12 Hann-tapered periodograms with no averaging and different
averaging with the Welch overlapping segment averaging (WOSA)
technique:
%compute unaveraged periodograms
h = spectrum.periodogram('rectangular');
hopts = psdopts(h,signal);
set(hopts,'SpectrumType','twosided');
hpsdirich = psd(h,signal,'ConfLevel',0.95);
figure;plot(hpsdirich);
h = spectrum.periodogram('hann');
hpsdhann = psd(h,signal,'ConfLevel',0.95);
figure;plot(hpsdhann);
%compute WOSA periodograms
h = spectrum.welch('hann',1024);
hpsdwelchhann1024 = psd(h,signal,'ConfLevel',0.95);
figure;plot(hpsdwelchhann1024);
h = spectrum.welch('hann',512);
hpsdwelchhann512 = psd(h,signal,'ConfLevel',0.95);
figure;plot(hpsdwelchhann512);
Figure 4.13 Application of zero-padding:
tt=1:1:2048;
Search WWH ::




Custom Search