ardglong.m
来自「matlab下实现kaplan算法」· M 代码 · 共 47 行
M
47 行
function reslabels = ardglong(data,inlabels,seglength,modelorder,iqrcrit)% reslabels = ardglong(data,inlabels,seglength,modelorder,iqrcrit)% Use AR modeling to deglitch a long time series by% breaking it up segments, deglitching separately, and then% concatenating the labels of the segments% minseglength is the smallest segment we would want to processminseglength = 30;% set default valuesif nargin < 5 iqrcrit = 3.5;endif nargin < 4 modelorder = 3;endif nargin < 3 seglength=300;endreslabels = 0*inlabels;for first=1:seglength:(length(data)-minseglength); last = min(length(data),first+seglength-1); % if we are going to leave a short data segment at the end, % include it in the next to the last segment (which will then be the last) if ((length(data)-last) < minseglength ) last = length(data); end % grab the data and labels indices = (first:last)'; res = ardeglch(data(indices), inlabels(indices), modelorder, iqrcrit ); reslabels(indices) = res; end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?