inverse distance interpolation
显示 更早的评论
Hey there, I am trying to use an inverse distance interpolation using invdisti.m. I can't find it in the Matlab database but it seems to be commonly used since I find it on many other pages.
This is the files header:
function fi = invdisti(R,Ri,f,opt)
% INVDISTI Inverse distance interpolation.
% FI = INVDISTI(R,RI,F) Interpolates multi-
% dimensional set with coordinates R (N by D)
% where N is the number of points and D -
% dimension and values F to points with
% coordinates RI.
% Returns interpolated values FI at points RI.
%
% FI = INVDISTI(R,RI,F,W) allows also W -
% vector of coefficients (relative weights)
% for combining results from interpolation
% with different power law in the form:
% FI = F1*W1+F2*W2+ ..., where F_i - estimates
% of interpolation with weiths proportional to
% R^(-D-i), (D - dimension).
% Default W = 3 which is equivalent to W=[1 1 1]
% is an equal-weight combination of estimates
% from R^(-D-1), R^(-D-2), R^(-D-3) laws.
%
% Uses inverse distance interpolation method.
% Copyright (c) 1995 by Kirill K. Pankratov
% kirill@plume.mit.edu
% 05/20/95
In my case I have the following argument dimensions: X=invdisti(2x7381,2x7381,1x7381), where the first matrix is a regular pattern on a sphere, the second one random points on a spehere and the third one values according to the points specified in the first one. However, I get this error "Error using '*'. Inner matrix dimensions must agree" from invdisti.m. Does anyone see how my way is not according to the files header? Thank you!
采纳的回答
更多回答(2 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!