📄 depths2step.m
字号:
function step=depths2step(depths,epsilon)% Compute sample increment for well logs; check if it is uniform or not and% set the appropriate value for "step".%% Written by: E. R.: April 17, 2006% Last updated: April 8, 2008: bug fix%% step=depths2step(depths,epsilon)% INPUT% depths vector of monotonically increasing depth values% epsilon maximum relative change increment from one depth value to the next% Default: epsilon = S4M.log_step_error% OUTPUT% step depth increment or zero if% abs(max(diff(depths))/median(diff(depths))-1 < epsilonglobal S4Mif nargin == 1 epsilon=S4M.log_step_error;endnsamp=length(depths);if nsamp == 1 step=0;elseif nsamp == 2 step=depths(2)-depths(1);else dd=diff(depths); mdd=median(dd); madd=max(dd); midd=min(dd); if (madd-midd)/mdd < epsilon step=mdd; else step=0; endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -