cos_taper.m
来自「地震中常用的一些偏移程序」· M 代码 · 共 31 行
M
31 行
function coef=cos_taper(sp,ep,samp)
% COS_TAPER: used by KIRK_MIG
% coefficients of cos taper
%
% coef=cos_taper(sp,ep,samp)
%
% coef: coefficient with length (start-end)/samp + 1
% sp: start point to begin taper
% ep: end point to stop taper
% samp: the sample interval; default is 1.
%
% By Xinxiang Li, CREWES project, U of C.
% FEB. 1996
%
dd=[];
if nargin < 2 error('At least two input arguments needed!'); end
if nargin < 3 samp = 1. ; end
if samp < 0 samp = -samp ; end
len = abs(ep-sp)/samp;
len = len+1;
if len <= 1 coef = [1.0]; end
if len > 1
coef=(1:len)*0.;
dd = 1.0/(len-1)*pi*0.5;
for i = 1:len
coef(i) = cos((i-1)*dd);
end
end
clear len,dd;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?