资源简介
适用于 matlab的反距离加权插值法,权重控制在30以下!
代码片段和文件信息
function [Vint]=IDW(original_xvectororiginal_yvectororiginal_zvectorinterpolated_xvectorinterpolated_yvectordistance_weightmoderadius_lenght)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%***************************************
%% INVERSE DISTANCE WEIGHT 反距离权重法 **
%%***************************************
%******INPUTS***********
%original_xvector = stations x coordinates (columns) [vector]
%original_yvector = stations y coordinates (rows) [vector]
%original_zvector = variable values on the point [original_xvector original_yvector]
%interpolated_xvector = interpolation points interpolated_xvector coordinates [vector]
%interpolated_yvector = interpolation points interpolated_yvector coordinates [vector]
%distance_weight = distance weight form -2/3 to -5/3 but not large 2 (very important)
% mode should be: ‘fr‘ : fixed radius (固定半径) or ‘ng‘ : neighbours (相邻)
%radius_lenght --- radius lenght 半径长度
%%% OUTPUTS
%Vint --- Matrix [length(interpolated_yvector)length(interpolated_xvector)] with interpolated variable values
%
%******************************EXAMPLES
%%% V_spa=IDW(x1y1v1xy-2‘ng‘length(x1));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mumu gaofujian_0@163.com
% Copyright 2014
% $Date: 2014/09/15 $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Vint=zeros(length(interpolated_yvector)length(interpolated_xvector));
original_xvector=reshape(original_xvector1length(original_xvector));
original_yvect
- 上一篇:双圆弧逼近
- 下一篇:svpwm的matlab仿真227144
评论
共有 条评论