Questions tagged [interpolation]

Anything related to function interpolation, i.e. the mathematical techniques for estimating the (unknown) value of a function in a point on the basis of a set of known values in other (usually nearby) points. For interpolation of strings, see the [string-interpolation] tag.

Anything related to function interpolation, i.e. the mathematical techniques for estimating the (unknown) value of a function in a point on the basis of a set of known values in other (usually nearby) points.

See Wikipedia on interpolation.

In scientific software for statistical computing and graphics, function approx implements linear interpolation and function spline implements cubic spline interpolation.

For interpolation of strings, see .

5155 questions
2
votes
2 answers

interpolating in R yearly time series data with quarterly values

I have a data set that has a list of IDs, year, and income. I am trying to interpolate the yearly values to quarterly values. id = c(2, 2, 2, 3, 3, 3,4,4,4,5,5) year = c(2000, 2001, 2002, 2000,2001,2002, 2000,2001,2002,2000,2002) income = c(20, 24,…
rajvijay
  • 1,641
  • 4
  • 23
  • 28
2
votes
0 answers

How does one calculate the smoothing condition used in python's interpolate.splrep?

I'm attempting to fit a cubic spline to a time-series using scipy's interpolate.splrep. However, I can't work out how to determine a valid smoothing condition without manually adjusting it by eye. It seems like there should be a way to calculate…
WillaB
  • 420
  • 5
  • 12
2
votes
1 answer

Interpolation of numpy array with a maximum interpolation distance

I have a numpy array that looks like this. I want to interpolate between data points to fill some smaller holes in the data. Let's say in this example I want to interpolate over a maximum of 2 pixels. Then I would expect something similar to…
lukaskrieger
  • 466
  • 4
  • 13
2
votes
1 answer

Find the closest point on a curve to a given point

The curve is in fact the trajectory of a bus, the curve is represented by many (up to a few thousand) discrete points on the curve (the points were recorded by a GPS device installed on the bus). Input a point P, I need to find the closest point on…
user416983
  • 974
  • 3
  • 18
  • 28
2
votes
1 answer

How to define values for RegularGridInterpolator

I have n equal length arrays whose transpose corresponds to the coordinates in an n dimensional parameter space: x = np.array([800,800,800,800,900,900,900,900,900,1000,1000,1000,1000,1000]) y =…
Joe Flip
  • 1,076
  • 4
  • 21
  • 37
2
votes
0 answers

PathInterpolatorCompat generating different Values on Lollipop and Kitkat

I am creating photo filters using independent RGB colour transformation. I create RGB curve using path and then convert the path to output array (0-255). Here is the code, for (int x = 0; x<256; x++) { PathInterpolator…
Varun Verma
  • 692
  • 7
  • 13
2
votes
1 answer

Polar 2D Interpolation

Say we are creating a calibration lookup table for a device, shown in the plot below. The theta represents different phase values, and the r represents different magnitude values. The calibration setpoints are shown in blue circles, and are taken at…
2
votes
1 answer

multivariable hermite spline

I know how to do bicubic patch from 16 control points ( i.e. 4x4 grid) like B-spline, Catmull–Rom, Besier ... However, I would like rather something like 2D/3D analogy to Hermite spline described by 4 control points (p00,p01,p10,p11) and 4 normals…
Prokop Hapala
  • 2,424
  • 2
  • 30
  • 59
2
votes
1 answer

Using interp2 in Matlab with NaN inputs

I have some observational data that is relatively complete, but contains some NaN values, in an matrix in matlab and I want to interpolate them to a more evenly spaced grid using interp2 So, to keep things simple lets say I have one complete (no NaN…
Chris Gordon
  • 191
  • 3
  • 13
2
votes
1 answer

Interpolation with Gnu R

I have not done this in my life, but is it possible to extract any number of points from a given slope/graph with Gnu R? Do be more precise, can I tell Gnu R to give me 400 points alongside the given data (is it not called interpolation even)?…
Til Hund
  • 1,543
  • 5
  • 21
  • 37
2
votes
1 answer

How to start animation one by one using onAnimationend()?

I am making an animation which consist of seven circles. I used interpolator and draw circles on canvas, the animation is quite okay. But I want each of the circles starts one by one (one after another)/ I developed a library project for this and…
pa1pal
  • 743
  • 3
  • 14
  • 32
2
votes
1 answer

How to set first and last slope of cubic spline interpolation in scipy.interpolate?

I have a data set containing n two-dimensional points (x0,y0),(x1,y1), ... (xn-1,yn-1) where x0 < x1 < ... < xn-1. I want to interpolate this data set using cubic splines with explicit slope values SBEGIN and SEND set at both end points (x0,y0) and…
Izumi Kawashima
  • 1,197
  • 11
  • 25
2
votes
1 answer

Integrating Velocity Over a Complex 2-D Surface

I'm using matlab to calculate the the average velocity in the cross section of a pipe by integrating discrete velocity points over a surface. The points are scattered in a random pattern that form a circle (almost). I used scatteredinterpolant to…
2
votes
1 answer

Interpolating Gridded 3D Data to a finer scale

I have a NetCDF file of a probability surface. It's a 30x30 grid of 0.25 degree lat/lon intervals with a probability surface described in the z dimension. I can easily import this into Panoply, a NetCDF viewer: And it's then a breeze (checking one…
stewart6
  • 259
  • 2
  • 4
  • 15
2
votes
3 answers

Interpolation with Delaunay Triangulation (n-dim)

I would like to use Delaunay Triangulation in Python to interpolate the points in 3D. What I have is # my array of points points = [[1,2,3], [2,3,4], ...] # my array of values values = [7, 8, ...] # an object with triangulation tri =…
mib0163
  • 393
  • 3
  • 12