%% Mann-Kendall Tau (aka Tau-b) with Sen's Method (enhanced) % A non-parametric monotonic trend test computing Mann-Kendall Tau, Tau-b, % and Sen抯 Slope written in Mathworks-MATLAB implemented using matrix % rotations. % % Suggested citation: % % Burkey, Jeff. May 2006. A non-parametric ...
function b = get_trend(y) % b is the slope, i.e., changes per step. N=size(y,1); % x=(1:N)'; % bls = regress(y, ); Comb = combnk(1:N,2); theil=diff(y(Comb),1,2)./diff(x(Comb),1,2); b=median(theil);
function y = inpaintn(x,n,y0) % INPAINTN Inpaint over missing data in N-D array % Y = INPAINTN(X) replaces the missing data in X by extra/interpolating % the non-missing elements. The non finite values (NaN or Inf) in X are % considered as missing data. X can be any N-D array. ...
function = histnc(varargin) % histnc - plot a normalized histogram colorful and stylized. % The PDF is estimated using the area equal one. % % Syntax: histc(data,bins,'r',style) % % Example: % x = randn(10000,1); % histnc(x,50,'g','LineWidth',.5,'Li ...
function =eof(X,neof) % function =eof_analysis(X,neof) % Wrapper function to perform PCA of a field X % with TWO spatial dimensions. (This code will also % work with a SINGLE spatial dimension. But it might % be easier to directly call 'principal_component_analysis'.) % This function basi ...
function Y = runmean(X, m, dim, modestr) ; % RUNMEAN - Very fast running mean (aka moving average) filter % For vectors, Y = RUNMEAN(X,M) computes a running mean (also known as % moving average) on the elements of the vector X. It uses a window of % 2*M+1 datapoin ...