⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lf_dc_removal.m

📁 实现地震勘探中
💻 M
字号:
function signal=lf_dc_removal(signal,type)% Function removes a half-period sine function (or sine-squared function) % from the columns of a matrix to make them zero-mean. % Intended to make autocorrelations zero-mean by removing more near their center%% Written by: E. R.: November 10, 2004% Last updated: November 28, 2004: Handle signal matrices and vectors%%          signal=lf_dc_removal(signal,type)% INPUT% signal   column vector or matrix; the DC component of each column is removed% type     type of DC removal%          if type == 0: sin(pi*t/T)%          if type ~= 0: sin(2*pi*t/T)^2% OUTPUT% signal   input vector without DC component%% EXAMPLE%          signal=rand(100,5);%          signal1=lf_dc_removal(signal,0);%          s_compare(signal,signal1)%          mytitle('Original (black) vs. after DC removal (red)')nsamp=size(signal,1);if  type == 0     test=sin(pi*(1:nsamp)'/(nsamp+1));else   test=sin(2*pi*(1:nsamp)'/(nsamp+1)).^2;endsignal=signal-(test/sum(test))*sum(signal);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -