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

  • 大小: 44KB
    文件類型: .zip
    金幣: 2
    下載: 2 次
    發布日期: 2021-06-04
  • 語言: Matlab
  • 標簽: 克里金??Co-Kriging??

資源簡介

本資源利用matlab實現了克里金及協同克里金插值代碼,里面包含測試代碼和相應的測試數據,絕對真實可靠。

資源截圖

代碼片段和文件信息

function?[zis2zi]?=?Co_kriging0(vstruct_1vstruct_2vstruct_12vstruct_21x1y1z1x2y2z2xiyichunksize)

%?x1?y1?z1???表示主變量的坐標及觀測值
%?x2?y2?z2???表示輔助變量的坐標及觀測值
%?xi?yi??????表示待估位置坐標
%?chunksize??如果待插值位置過多,分組進行插值,此處chunksize表示每組的個數

%?interpolation?with?ordinary?kriging?in?two?dimensions
%
%?Syntax:
%
%?????[zizivar]?=?kriging(vstructxyzxiyi)
%?????[zizivar]?=?kriging(vstructxyzxiyichunksize)
%
%?Description:
%
%?????kriging?uses?ordinary?kriging?to?interpolate?a?variable?z?measured?at
%?????locations?with?the?coordinates?x?and?y?at?unsampled?locations?xi?yi.
%?????The?function?requires?the?variable?vstruct?that?contains?all
%?????necessary?information?on?the?variogram.?vstruct?is?the?forth?output
%?????argument?of?the?function?variogramfit.
%
%?????This?is?a?rudimentary?but?easy?to?use?function?to?perform?a?simple
%?????kriging?interpolation.?I?call?it?rudimentary?since?it?always?includes
%?????ALL?observations?to?estimate?values?at?unsampled?locations.?This?may
%?????not?be?necessary?when?sample?locations?are?not?within?the
%?????autocorrelation?range?but?would?require?something?like?a?k?nearest
%?????neighbor?search?algorithm?or?something?similar.?Thus?the?algorithms
%?????works?best?for?relatively?small?numbers?of?observations?(100-500).
%?????For?larger?numbers?of?observations?I?recommend?the?use?of?GSTAT.
%
%?????Note?that?kriging?fails?if?there?are?two?or?more?observations?at?one
%?????location?or?very?very?close?to?each?other.?This?may?cause?that?the?
%?????system?of?equation?is?badly?conditioned.?Currently?I?use?the
%?????pseudo-inverse?(pinv)?to?come?around?this?problem.?If?you?have?better
%?????ideas?please?let?me?know.
%
%?Input?arguments:
%
%?????vstruct???structure?array?with?variogram?information?as?returned
%???????????????variogramfit?(forth?output?argument)
%?????xy???????coordinates?of?observations
%?????z?????????values?of?observations
%?????xiyi?????coordinates?of?locations?for?predictions?
%?????chunksize?nr?of?elements?in?zi?that?are?processed?at?one?time.
%???????????????The?default?is?100?but?this?depends?largely?on?your?
%???????????????available?main?memory?and?numel(x).
%
%?Output?arguments:
%
%?????zi????????協同克里金預測值
%?????zivar?????協同克里金方差
%
%?Date:?2018-03-31
%?Author:?SQ

%判斷是否有NaN值
II1?=?(isnan(x1)?|?isnan(y1)?|?isnan(z1));
x1(II1:)?=?[];??y1(II1)???=?[];??z1(II1)???=?[];

II2?=?(isnan(x2)?|?isnan(y2)?|?isnan(z2));
x2(II2:)?=?[];??y2(II2)???=?[];??z2(II2)???=?[];


%?size?of?input?arguments
sizest???=?size(xi);
numest???=?numel(xi);
numobs_1?=?numel(x1);
numobs_2?=?numel(x2);
numobs???=?numobs_1?+?numobs_2;

%?force?column?vectors
xi??=?xi(:);
yi??=?yi(:);
x1??=?x1(:);
y1??=?y1(:);
z1??=?z1(:);
x2??=?x2(:);
y2??=?y2(:);
z2??=?z2(:);

if?nargin?==?12;
????chunksize?=?100;
elseif?nargin?==?13;
else
????error(‘wrong?number?of?input?arguments‘)
end

%?check?if?the?latest?version?of?variogramfit?is?used
i

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-03-31?16:06??克里金及協同克里金代碼\
?????文件????????8758??2018-03-31?16:15??克里金及協同克里金代碼\Co_kriging0.m
?????文件???????12325??2018-03-31?16:13??克里金及協同克里金代碼\Co_variogram_sq.m
?????文件????????8139??2012-02-06?06:53??克里金及協同克里金代碼\fminsearchbnd.m
?????文件????????6687??2018-03-31?15:37??克里金及協同克里金代碼\kriging0.m
?????文件????????1811??2018-03-31?16:06??克里金及協同克里金代碼\Test.m
?????文件???????18796??2018-03-30?09:04??克里金及協同克里金代碼\Test_data.mat
?????文件???????12698??2018-03-27?11:03??克里金及協同克里金代碼\variogram.m
?????文件???????18370??2018-03-31?15:56??克里金及協同克里金代碼\variogramfit2.m

評論

共有 條評論