Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Australia MyPost shipping For Magento 2 1.0.0
Australia Post eParcel For Magento 1.1.1
Source Control for SQL Server 2.0
Answers phpSoftPro 3.12
Exlcart 2.0
School College ERP 1.3.2
White-label Grocery Delivery App Solution 2.0
Top Code
IcrediBB Bulletin Board System 1.0
iScripts EasySnaps 1
iScripts EasyIndex 1
iScripts NetMenus 2.0
Vue Injector 3.3
OpenGl 3D Effect 1.1
Linklok URL
Password Generator Software 2.3
Put your app in the System Tray 1.1
CardCheck COM DLL for Credit Card Processing 1.1
GnuWin64 64
Custom Order Form2 1
WEditor 1.0
Answers phpSoftPro 3.12
T-Shirt Designer Software 4.0
Top Rated
Answers phpSoftPro 3.12
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION 1.0
File ID: 78748






Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION 1.0
Download Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION 1.0http://www.mathworks.com/Report Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 29
Submit Rating:
Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION 1.0 Description
Description: This function computes at (Xi,Yi) unknown locations the IDW (w<0) or the SMA (w=0) predictions using r1 neighbourhood type ('n':number of points; 'r':radius) and r2 neighbourhood size from Vc measured values at (Xc,Yc) locations.

OUTPUTS
Vi: (mandatory) [PxQ] gIDW interpolated values
--> 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<0, for Inverse Distance Weighted
interpolation [IDW]
--> 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

License: Freeware

Related: r13d039n039, gidwxcycvcxiyi, inputs, dlengthxc, Calculation, dlargest, Syntax, Radius, fixed, 039r039, Length, r13d3d039n039, largest, r13d3d039r039, lengthxc

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 29



More Similar Code

FILLNANS replaces all NaNs in array using inverse-distance weighting.
Y = FILLNANS(X) replaces all NaNs in the vector or array X by inverse-distance weighted interpolation:
Y = sum(X/D^3)/sum(1/D^3)
where D is the distance (in pixels) from the NaN node to all non-NaN values X. Values farther from a known non-NaN value will tend toward the average of all the values.

Y = FILLNANS(...,'power',p) uses a power of p in the...



Kriging and inverse distance are popular interpolation methods, especially in earth sciences. There are some routines already available on matlab but are severely limited by matlabs memory constraints. By using gstat to handle interpolation and...



he code performs the simulation of time series with autoregressive fractionally integrated moving average (ARFIMA) models that generalize ARIMA (autoregressive integrated moving average) and ARMA autoregressive moving average models. ARFIMA models...



It calculates the Tillson moving average. The user is able to change the parameters such as the smoothing sweeps and the volume factor



Implementation of Moving Average filter.
The moving average filter operates by averaging a number of points from the
input signal to produce each point in the output signal. In equation form,
this is written:

1 M-1



This file contains three m-file which estimate the Value at Risk (VaR) of portfolio composed of two stocks price by using Exponentially Weighted Moving Average.
the main function is 'ewmaestimatevar'. For estimating VaR you should use this...



Simple VaR Calculator provides:

- Evaluation of return distribution of single asset or portfolio of assets;

- Volatility forecasts using moving average and exponential algorithm;

- Value at Risk of single asset...



INVDISTGRID Simple, robust gridding using inverse-distance interpolation.
[Xi,Yi,Zi] = invdistgrid[X,Y,Z,dx] Grids values in vector Z with coordinates X and Y into an array with spacing dx using inverse-distance weighting (default power =2)....



This code calculates the Exponentially Weighted Moving Average Standard Deviation
Exponentially weighted moving average (EWMA) standard deviation applies different weights to different returns. More recent returns have greater weight on the...



Very efficient moving average filter implemented using convolution.

Usage:

Smoothed Data = movave(Data Vector, Averaging Window Size in Samples)

See also: slidefilter.m by the same author

User Review for Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION
- required fields
     

Please enter text on the image