资源简介
老外编的kriging插值 老外编的kriging插值 老外编的kriging插值 老外编的kriging插值
代码片段和文件信息
function [zis2zi] = kriging(vstructxyzxiyichunksize)
% 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 kriging predictions
% zivar kriging variance
%
% Example:
%
% % create random field with autocorrelation
% [XY] = meshgrid(0:500);
% Z = randn(size(X));
% Z = imfilter(Zfspecial(‘gaussian‘[40 40]8));
%
% % sample the field
% n = 500;
% x = rand(n1)*500;
% y = rand(n1)*500;
% z = interp2(XYZxy);
%
% % plot the random field
% subplot(221)
% imagesc(X(1:)Y(:1)Z); axis image; axis xy
% hold on
% plot(xy‘.k‘)
% title(‘random field with sampling locations‘)
%
% % calculate the sample variogram
% v = variogram([x y]z‘plotit‘false‘maxdist‘100);
% % and fit a spherical variogram
% subplot(222)
% [dumdumdumvstruct] = variogramfit(v.distancev.val[][][]‘model‘‘stable‘);
% title(‘variogram‘)
%
% % now use the sampled locations in a kriging
% [ZhatZvar] = kriging(vstructxyzXY);
% subplot(223)
% imagesc(X(1:)Y(:1)Zhat); axis
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-08-28 21:29 kriging-master\
文件 117862 2014-08-28 21:29 kriging-master\kriging.jpg
文件 6165 2014-08-28 21:29 kriging-master\kriging.m
文件 1320 2014-08-28 21:29 kriging-master\license.txt
- 上一篇:批量更改文件名 任意位置插入相同的字符
- 下一篇:恶意dns列表
相关资源
- 雷达中的微多普勒效应 程序代码
- SAR图像变化检测方法,包括了对数比
- 矩量法计算线天线辐射方向图
- 车间调度算法
- 非局部均值滤波
- 直流微网建模,母线电压200V,改进下
- 自校正PID控制算法
- relief算法的代码实现
- arcgis地质灾害符号图例
- 斯皮尔曼的等级相关系数
- 互信息的计算
- Zernike矩亚像素边缘检测
- 相位展开传统算法
- 倾斜haar-like feature计算
- m序列_gold及m&walsh序列生成及序列相关
- BP神经网络程序非工具箱
- 深度玻尔兹曼机
- PCB识别包含程序截图和原图
- 无网格方法解悬臂梁问题
- 基于maltab的LED阵列仿真
- 稀疏分解图像重建程序,把图像分解
- 基于ANN的6种2ASK、4ASK、2FSK、4FSK、2P
- 数字图像处理大作业————各种图
- IAPWS_IF97
- CBBA任务分配程序
- Tasi和张正友两种方法仿真程序
- labview读取mat格式文件
- mat格式文件在labview中显示波形
- CAD地质线型图例
- Turbo码的编解码,可以达到论文中仿真
评论
共有 条评论