📄 toon0532.m
字号:
% toon0532 -- Compress/Decompress Seismic Trace
%
% Try and compress the seismic trace using the top 100 DCT
% coefficients. Plot the reconstruction and the error.
%
trace = ReadSignal('Seismic')'; % note transpose
%
dctcoef = dct_iv(trace);
%
dcrev = reverse((sort(dctcoef.^2)));
thresh = sqrt(dcrev(100));
dctt = dctcoef .* (abs(dctcoef) >= thresh);
recon = dct_iv(dctt);
%
subplot(3,1,1)
plot(trace)
title('Seismic Trace')
ax = axis;
subplot(3,1,2)
plot(recon)
title('Reconstruction from 100 Cosine Coefficients');
axis(ax);
subplot(3,1,3)
plot(trace-recon)
title('Error')
axis(ax);
%% Part of Wavelab Version 850% Built Tue Jan 3 13:20:43 EST 2006% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail wavelab@stat.stanford.edu
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -