s_convert.m
来自「地震、测井方面matlab代码,解释的比较详细」· M 代码 · 共 49 行
M
49 行
function seismic=s_convert(traces,first,step,history,units)
% Function creates a minimal seismic data structure (the history field is optional)
% Written by; E. R.
% Last updated: October 7, 2003: add "tag" field
%
% seismic=s_create(traces,first,step,history,units)
% INPUT
% traces array of seismic traces
% first start time/frequency/depth
% step sample interval
% history optional string to put into history field
% units string with units of measurements (default: 'ms')
% OUTPUT
% seismic seismic structure satisfying minimal requirements
global S4M
if isempty(S4M)
presets
S4M.script='';
end
seismic.type='seismic';
seismic.tag='unspecified';
seismic.name='';
seismic.first=first;
seismic.step=step;
seismic.last=first+(size(traces,1)-1)*step;
seismic.traces=traces;
if nargin < 5
seismic.units='ms';
else
seismic.units=units;
end
test=find(isnan(traces)); % Check for NaNs
if ~isempty(test)
seismic.null=NaN;
end
if S4M.history
if nargin < 4
history=[];
end
seismic=s_history(seismic,'add',history);
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?