nt_detrend2
PURPOSE
[y,w,r]=nt_detrend2(x,varargin) - robustly remove trend,
SYNOPSIS
function [y,w,r]=nt_detrend2(x,varargin)
DESCRIPTION
CROSS-REFERENCE INFORMATION
This function calls:
- nt_detrend [y,w,r]=nt_detrend(x,order,w,basis,thresh,niter,wsize) - robustly remove trend
This function is called by:
- nt_detrend (original) [y,w,r]=nt_detrend(x,order,w,basis,thresh,niter,wsize) - robustly remove trend
- nt_detrend [y,w,r]=nt_detrend(x,order,w,basis,thresh,niter,wsize) - robustly remove trend
SOURCE CODE
0001 function [y,w,r]=nt_detrend2(x,varargin)
0002
0003
0004
0005
0006
0007
0008
0009 if iscell(x)
0010 error('not implemented');
0011 end
0012 if nargout>1;
0013 error('single output only');
0014 end
0015
0016 xx=mean(x,3);
0017 yy=nt_detrend(xx,varargin{:});
0018 trend=xx-yy;
0019 y=bsxfun(@plus,x,-trend);
0020
Generated on Sat 29-Apr-2023 17:15:46 by m2html © 2005