isregularlysampled.m

来自「实现地震勘探中」· M 代码 · 共 21 行

M
21
字号
function bool=isregularlysampled(x,tol)% Check if vector "x" is regularly sampled (constant increment from one % value to the next)%% Written by: E. R.: September 5, 2006% Last updated:%%        bool=isregularlysampled(x,tol)% INPUT% x      vector to check% tol    relative error of increments; default: 1.0e-7% OUTPUT% bool   logical variable; "true" if "x" is regularly sampled; "false" otherwiseif nargin == 1   tol=1.0e-6;enddx=diff(x);bool=all(isnearinteger(dx/mean(dx),tol));

⌨️ 快捷键说明

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