📄 s_get_extrema.m
字号:
function [values,times,index]=s_get_extrema(seismic,option)% Determine, for each trace, the value of the requested trace extremum and % the time and the sample index where they occur for the first time.%% Written by: E. R.: May 8, 2006% Last updated: %% [values,times,index]=s_get_extrema(seismic,option)% INPUT% seismic seismic dataset% option string indicating typ of extremum; possible values are 'max','min'% OUTPUT% values row vector with the values of the extrema (one for each trace)% times row vector with the times where the first extreme value occurs on % each trace% index row vector of sample indices of the extreme values%% EXAMPLE% seismic=s_data;% [values,times]=s_get_extrema(seismic,'max');% disp(values),% disp(times)switch optioncase 'max' [values,index]=max(seismic.traces);case 'min' [values,index]=min(seismic.traces);otherwise error('Unknown option.')endtimes=(index-1)*seismic.step+seismic.first;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -