91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-20
  • 語言: Matlab
  • 標簽: matlab??mk檢驗??

資源簡介

該matlab代碼適用于MK顯著性檢驗。類似于students t test

資源截圖

代碼片段和文件信息

%?Time?Series?Trend?Detection?Tests
%?[?z?sl?lcl?ucl?]?=?trend(?y?dt?)
%?where?z?=?Mann-Kendall?Statistic
%?sl?=?Sen‘s?Slope?Estimate
%?lcl?=?Lower?Confidence?Limit?of?sl
%?ucl?=?Upper?Confidence?Limit?of?sl
%?y?=?Time?Series?of?Data
%?dt?=?Time?Interval?of?Data
%y是待檢測數據序列
function?[?z?sl?lcl?ucl?]?=?mk(?y?)
n?=?length(?y?);
dt=1;

%?Mann-Kendall?Test?for?N?>?40
????%?disp(?‘Mann-Kendall?Test;‘?);
????%?if?n?????%?disp(?‘WARNING?-?sould?be?more?than?40?points‘?);
????%?end;

%?calculate?statistic
s?=?0;
for?k?=?1:n-1
????for?j?=?k+1:n
????????s?=?s?+?sign(?y(j)?-?y(k)?);
????end;
end;

%?variance?(?assuming?no?tied?groups?)
v?=?(?n?*?(?n?-?1?)?*?(?2?*?n?+?5?)?)?/?18;

%?test?statistic
if?s?==?0
z?=?0;
elseif?s?>?0
z?=?(?s?-?1?)?/?sqrt(?v?);
else
z?=?(?s?+?1?)?/?sqrt(?v?);
end;?

%?should?calculate?Normal?value?here
nor?=?1.96;
%?results
disp(?[?‘?n?=?‘?num2str

評論

共有 條評論