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
1 answer

Interpolate multiline string with correct indent

When I am trying to interpolate one multiline string into another I get wrong indentation because only the first line of substring has right indent, e.g.: substring = <<-STRING.strip_heredoc first line second line STRING string =…
Nick Roz
  • 3,918
  • 2
  • 36
  • 57
2
votes
3 answers

Count specific patterns in data frame, doing interpolation in R

I have a dataset in data frame format, like this: wpt ID Fuel Express Local 1 S36 12 0 1 2 S36 14 1 0 inter S36 NA 1 0 inter S36 NA 1 0 3 S36 16 1 …
Demo
  • 291
  • 1
  • 5
  • 16
2
votes
2 answers

Encase signal by getting the upper and lower envelope in MATLAB

I have a signal that bounces around some values. I want to encase the signal from above and below as seen in the following figure: If the signal only grows or decreases, using a running maxima script works great: function [out] = rMax(X) Y=X; …
Jared Lo
  • 229
  • 1
  • 9
2
votes
3 answers

From tuples to linear equations with numpy

i need help in the following topic. Lets say i have three points, each with x, y coordinates and a corresponding z value, e.g.: p_0 = (x_0, y_0, z_0) : coordinates of first point p_1 = (x_1, y_1, z_1) : coordinates of second point p_2 = (x_2, y_2,…
Alex
  • 337
  • 4
  • 12
2
votes
1 answer

Interpolating accross an array with "holes" (masked array)

I have a set of non-gridded points and a grid with holes in it - represented by an array with NaN's in it (a masked array?). I am trying to "map" the non-gridded points onto this grid and then interpolate across the grid, with the NaN areas serving…
fp1991
  • 140
  • 1
  • 10
2
votes
1 answer

Groovy reference repeating nodes values in xml with xpath (interpolation misuse?)

Setup: SOAP UI 5.2.0., Groovy step to generate XMLs. We need to read a CSV which contains XPath-like nodes locations and new values to be placed to sample XML. The last version of the code in the following answer fits our goal perfectly fine: Groovy…
Zaplatki
  • 35
  • 7
2
votes
1 answer

Interpolating rasterstack time series with spline in R

I am trying to fill the gaps in a time series of ndvi images using spline. I have created a raster stack with the ndvi images I have and some layers with only NA for the timesteps that I don't have. The raster stack is available as a Geotiff…
ciskoh
  • 148
  • 13
2
votes
1 answer

Spline interpolation for values for time

One column with time and date values, and the other with values of speed, I would like to interpolate the value of speed for any given time as below, but I am getting an error. This is the data set. startTimestamp avg_Speed 2016-04-11…
2
votes
1 answer

Finding interpolations by group, maybe using dplyr

I am looking to use the interp and interp2xyz functions from akima in a dplyr pipe as I would like to calculate the interpolation by a group variable and output the xyz values AND a grouping variable. So I ideally I'd like something like this (a…
boshek
  • 4,100
  • 1
  • 31
  • 55
2
votes
4 answers

Java: Reduce array to specific number of averages

The main issue which needs to be solved is: Let's say I have an array with 8 numbers, e.g. [2,4,8,3,5,4,9,2] and I use them as values for my x axis in an coordinate system to draw a line. But I can only display 3 of this points. What I need to do…
2
votes
1 answer

Type error on my fit function using gaussian process in scikit

Ok, so I have been working on some code that takes an image that represents sparse point data from Houdini and interpolates it into a usable complete map. This has been working really well, except that now I am running into some memory issues. I…
Adalast
  • 151
  • 1
  • 1
  • 8
2
votes
6 answers

How can I detect "missing" elements in an IEnumerable?

I've got an IEnumerable containing a list of data elements with consistent intervals in one of the properties: List list = new List { new Interval{ TIME_KEY = 600}, new Interval{…
Chris McCall
  • 10,317
  • 8
  • 49
  • 80
2
votes
1 answer

Interpolate within points in a vector

Vector V1 contains 56 observations for X, and vector BS contains a bootstrapped sample of V1 of length 100000. I would like to interpolate linearly within points in BS to fill in any missing values. For example, V1 contains no 0.27 values, and hence…
Krug
  • 1,003
  • 13
  • 33
2
votes
1 answer

Vue.js - Interpolation error - how to rework style to v-bind:style?

I am currently getting this console error message: interpolation in "style" attribute will cause the attribute to be discarded in Internet Explorer. Use v-bind:style instead. Which is caused by this piece of code:
Stephan-v
  • 19,255
  • 31
  • 115
  • 201
2
votes
1 answer

A more pythonic way to find curve intersections

I am currently interpolating measurements using cubic splines as shown in the picture: The idea is I want to find the full width half-maximum of that interpolation. For that I'm using the small piece of code f = interpolate.interp1d(hhg_data,…
Roland
  • 35
  • 6