Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

# Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION 1.0

Date Added: April 22, 2013  |  Visits: 272

This function computes at (Xi,Yi) unknown locations the IDW (w P=1, Q=1 yields interpolation at one point --> P>1, Q=1 yields interpolation at a vector of points --> P>1, Q>1 yields interpolation at a (ir)regular grid of points======================================== INPUTS Xc: (mandatory) [Nx1] x coordinates of known points Yc: (mandatory) [Nx1] y coordinates of known points Vc: (mandatory) [Nx1] known values at [Xc, Yc] locations Xi: (mandatory) [PxQ] x coordinates of points to be interpolated Yi: (mandatory) [PxQ] y coordinates of points to be interpolated w: (mandatory) [scalar] distance weight --> w w=0, for Simple Moving Average (only if neighorhood size is local and not global) [SMA] r1: (optional) [string] neighbourhood type --> 'n' (default) number of neighbours --> 'r' fixed radius length r2: (optional) [scalar] neighbourhood size --> number of neighbours, if r1=='n' default is length(Xc) --> radius length, if r1=='r' default is largest distance between known points======================================== SYNTAX --- IDW --- all inputs: Vi = gIDW(Xc,Yc,Vc,Xi,Yi,-2,'n',30); 6 inputs: Vi = gIDW(Xc,Yc,Vc,Xi,Yi,-2); --> r1='n'; r2=length(Xc); 7 inputs: Vi = gIDW(Xc,Yc,Vc,Xi,Yi,-2,'n'); --> r2=length(Xc); Vi = gIDW(Xc,Yc,Vc,Xi,Yi,-2,'r'); --> r2=largest distance between know points [Xi,Yi] (see D1 calculation) --- SMA --- Vi = gIDW(Xc,Yc,Vc,Xi,Yi,0,'n',10); --- Spatial Map --- Vi = gIDW(Xc,Yc,Vc,Xi,Yi,-2,'n',10); -with Xi and Yi 2D arrays of coordinates relative to an (ir)regular grid.======================================== EXAMPLES Interpolation at one point location: Vi = gIDW([1:1:10]',[2:2:20]',rand(10,1)*100,5.5,11,-2,'n'); --- Interpolation at a regular grid of unknown points: XYc = [1:1:10]'; Vc = rand(10,1)*100; Xi = rand(50,50)*10; Yi = rand(50,50)*10; [Xi,Yi] = meshgrid(XYc); Vi = gIDW(XYc,XYc,Vc,Xi,Yi,-2,'r',3); hold on mapshow(Xi,Yi,Vi,'DisplayType','surface') colormap gray scatter(XYc,XYc,Vc,'filled','MarkerFaceColor','g','MarkerEdgeColor','y') axis([0,11,0,11]) hold off

 Requirements: No special requirements Platforms: Matlab Keyword: 039r039,  Calculation,  Dlargest,  Dlengthxc,  Fixed,  Gidwxcycvcxiyi,  Inputs,  Largest,  Length,  Lengthxc,  R13d039n039,  R13d3d039n039,  R13d3d039r039,  Radius,  Syntax Users rating: 0/10

USER REVIEWS
 More Reviews or Write Review
INVERSE DISTANCE WEIGHTED (IDW) OR SIMPLE MOVING AVERAGE (SMA) INTERPOLATION RELATED
 Development Tools  -  Fractional-order differential order equation solver 1.0 This function solves the linear fractional-order differential equations (FODE) with constant coefficients. The short memory principle has not neen used here, so the length of input signal is limited to few hundred samples. The parameters of the... 10 KB Development Tools  -  polyfitweighted 1.0 Like polyfit.m but includes weighting of each data point.Summary----------------Find a least-squares fit of 1D data y(x) with an nth order polynomial, weighted by w(x).Usage-----P = polyfitweighted(X,Y,N,W) finds the coefficients of a polynomial... 10 KB Modules  -  RokCandy 1.2 What is RokCandy?RokCandy provides BBCode style macro functionality for Joomla. It provides a WYSIWYG-safe macro syntax to allow you to easily add complex HTML with a simple BBCode macro. RokCandy changes the preset syntax, such as [example] to... 61.44 KB Programming  -  g95 g95 projects goal is to create a free, open source Fortran 95 compiler. The code has been donated to the Free Software Foundation for inclusion in GCC, the Gnu Compiler Collection. G95 is still in a beta state. G95 can compile most fortran 90/95... 3.2 MB Network & Internet  -  Stompy 0.04 Stompy provides a tool to check the security of Web session IDs and other tokens. Stompy the session stomper is a penetration testing tool that performs an automated analysis and runs an array of fairly sophisticated tests on WWW session... 31.74 KB Multimedia & Graphics  -  SAFKAS Image Resizer 1.0 SAFKAS Image Resizer is a reliable application designed to enable you to quickly resize your images. With SAFKAS Image Resizer you can automatically resize your images or pictures, like JPG, JPEG, PNG, GIF or BMP, to an arbitrary size. Choose... Screen Savers  -  VisionSynth for Mac OS 2.0 Following in the tradition of other popular Psychedelic Spiral Screensavers Comet Way is pleased to release its own unique screensaver for the Mac: VisionSynth. It adds some uniqueness and variety of its own while retaining many of the familiar... 194.56 KB Development Tools  -  Heat exchanger cost estimation 1.0 Calculation with variety of inputs parametres, such as:type of exchangerheat exchange arealengthmaterialpressure 30.72 KB Development Tools  -  MATLAB simulation of fixed-mass rigid-body 6DOF 1.0 SIXDOF Calculate aircraft fixed-mass rigid-body six-degrees-of-freedom equations of motion using MATLAB ODE45 solver. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Inputs: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Forces = 3x1 vector of forces in... 10 KB Development Tools  -  Fixed Income calculation(Chinese Version) 1.0 This is a part of my books, a book to introduce the matlab use in finance, this is the first part of the series.We discuss the calculation rules and how to use the matlab functions to calculate the fixed income securities. Also we have analyze the... 512 KB