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

📄 s_create_spike.m

📁 实现地震勘探中
💻 M
字号:
function wavelet=s_create_spike(varargin)% Create a spike (seismic dataset with a spike of default-amplitude 1 at a % specified time.%% See also: s_create_wavelet%% Written by: E. R.: November 7, 2006% Last updated: January 1, 2007: Add "null" field and convert to requested precision%%            wavelet=s_create_spike(varargin)% INPUT% varargin   one or more cell arrays; the first element of each cell array%            is a keyword, the other elements are parameters.%            Presently, keywords are:%     'amplitude'   amplitude of spike%            Default: {'amplitude',1}%     'location'    time of spike%            Default: {'location',0}%     'step'  sample interval of spike%            Default: {'step',4}%     'times' start time and end time of the spike data set; can be two numbers%            or a two-element vector%            Default: {'times',0,0}%% EXAMPLE%            spike=s_create_spikerun_presets_if_needed%	Defaults of input parameterparam.amplitude=1;param.times=[0,0];param.location=0;param.step=4;%	Replace defaults by actual input argumentsparam=assign_input(param,varargin);if iscell(param.times)   param.times=cell2num(param.times);endparam.times(1)=floor(param.times(1)/param.step)*param.step;param.times(2)= ceil(param.times(2)/param.step)*param.step;if param.location < param.times(1)  ||  param.location > param.times(2)   error('Spike location must not be outside of the time range specified for the seimic trace.')endnsamp=(param.times(2)-param.times(1))/param.step+1;temp=zeros(nsamp,1);temp(round((param.location-param.times(1))/param.step)+1)=param.amplitude;wavelet=s_convert(temp,param.times(1),param.step);wavelet.name='Spike';

⌨️ 快捷键说明

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