inverse distance interpolation
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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!
0 comentarios
Respuesta aceptada
Walter Roberson
el 12 de En. de 2012
It looks to me as if likely F should contain N values (2 in your case).
As you are operating on a sphere, it sounds like you would more likely want
invdisti(7381x3, 7381x3, 7381x1)
0 comentarios
Más respuestas (2)
Ver también
Categorías
Más información sobre Multidimensional Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!