科学网

 找回密码
  注册
Mann-Kendall Tau (aka Tau-b) with Sen's Method
热度 1 王国杰 2013-9-13 16:42
%% 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 ...
11529 次阅读|1 个评论 热度 1
Theil Sen Trend Estimator
王国杰 2013-9-13 16:09
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);
7724 次阅读|没有评论
inpaint data gaps of N dimensions
王国杰 2013-9-13 14:45
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. ...
3351 次阅读|没有评论
plot a normalized histogram
王国杰 2013-9-13 14:25
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 ...
3534 次阅读|没有评论
EOF analysis of one climate field
热度 2 王国杰 2012-11-1 17:09
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 ...
5023 次阅读|3 个评论 热度 2
fast runmean smoothing
热度 1 王国杰 2012-11-1 16:37
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 ...
3325 次阅读|1 个评论 热度 1
SVD analysis of two climate fields
热度 1 王国杰 2012-11-1 16:21
function = calSVD(xdata,ydata,N) =size(xdata); xdata=reshape(xdata, ); % =size(ydata); ydata=reshape(ydata, ); % innx= find(~isnan(xdata(:,10))); xdata=xdata(innx,:); xdata=permute(xdata, ); xdata=detrend(xdata,'constant'); xdata(isnan(xdata))=0; inny= find(~isnan(ydata(:,10))); ydata ...
3075 次阅读|1 个评论 热度 1
estimating sensitivity of rainfall frequencies to vegetation
王国杰 2012-10-26 21:09
# cdo ./cdo selname,tpr daily_no_land.nc tpr_daily_no.nc ./cdo selname,tpr daily_yes_land.nc tpr_daily_yes.nc ./cdo splitseas tpr_daily_no.nc tpr_daily_no_ ./cdo splitseas tpr_daily_yes.nc tpr_daily_yes_ # cdo WET 5 days ./cdo eca_cwd,1 tpr_daily_yes.nc tpr_daily_yes_wet5d.nc ./cdo eca_c ...
3591 次阅读|没有评论

本页有 2 篇博文因作者的隐私设置或未通过审核而隐藏

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 00:29

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部