Questions tagged [linear-interpolation]

Linear interpolation is the process of approximating intermediate values given an assumption that the ranges of missing data look roughly like straight lines.

Linear interpolation is largely used for its simplicity and is typically more effective given a greater density of data. The more complex the underlying relationship of the quantities involved, the less likely linear interpolation is to provide a good value estimates.

In scientific software for statistical computing and graphics, function approx performs 1D linear interpolation.

437 questions
0
votes
1 answer

Plot a 3D linear surface from 2D functions in R

I have the following data: x <- c(1000,2000,3000,4000,5000,6000,8000,12000) y_80 <- c(33276,33276,5913,2921,1052,411,219,146) y_60 <- c(14724,14724,3755,1958,852,372,211,140) y_40 <- c(9632,9632,2315, 1250,690,332,196,127) y_20 <-…
0
votes
1 answer

Access 2013 SQL to perform linear interpolation where necessary

I have a database in which there are 13 different products, sold in 6 different countries. Prices increase once a year. Prices need to be calculated using a linear interpolation method.  I have 21 different price and quantity increments for each…
0
votes
1 answer

Linear interpolation how to insert points in a feature matrix in order to make them of equal size

In a lip reading project. I have a data set of not equal number of frames for each video a feature matrix was extracted where the number of rows is the number of frames and the columns is the value of the feature extracted. The problem is that the…
0
votes
1 answer

Linear interpolation in matlab using columns of data

I have some travel time data stored as column vectors. I want to write a script that will allow me run a linear interpolation from specified initial and final values, to make a column of distances, so I can calculate velocity. example: Column 1: …
M Vaughan
  • 5
  • 4
0
votes
2 answers

How to do linear interpolation?

I have line segment with start s(x1,y1) and end e(x2,y2). I have calculated distance between s and e by using euclidean distance d = sqrt((x1-x2)(x1-x2) + (y1-y2)(y1-y2)) How to find out point on the line segment at distance d1 (0 < d1< d)?
omkar1707
  • 75
  • 1
  • 6
0
votes
1 answer

linear interpolation to find corresponding vales from two tables using python

i want to write a function that accepts two lists, one of x values and one of y(x) values and returns the corresponding y(x) value when given an x value. i also want to use linear interpolation to find y(x) for values of x between the numbers in the…
tribo32
  • 333
  • 3
  • 15
0
votes
2 answers

Python series algorithm

I have a list of this sort : numbers = [12, None, None, 17, 20, None, 28] What's the best path to consider in order to fill in None values with appropriate numbers so that the None values get numbers in between the defined values. Example : numbers…
The Other Guy
  • 576
  • 10
  • 21
0
votes
1 answer

Interleaved stereo linear interpolation

I am implementing real time linear interpolation of audio data, which is stored in interleaved audio buffers. Audio files can be single- or multichannel. In case of single channel audio files, I interpolate as follows: f_dex = offset + ((position /…
0
votes
0 answers

Scipy interpolation.griddata freezes when called on a particular point

I am trying to perform a simple 2D linear interpolation with Scipy interpolation.griddata but it behaves in a strange way : it runs forever and the computation can't be interrupted (100% CPU, RAM doesn't move, and I have to kill the process). The…
0
votes
1 answer

Curve fitting in Python using a data sets

I am really new in Python, hence I am asking a simple question: I have a sets of data (x1, x2, x3, x4, x5) and corresponding (y1, y2, y3, y4, y5). Now, how can I use Python to find a y value for a given x value? (x lies in between x1 to x5) As an…
0
votes
2 answers

linear interpolate 15 Hz time series to match with 25 Hz time series in R

Hi I have the following data recorded with 15Hz and I want to resample it using linear interpolation to 25 Hz. What is the best way to achieve this? Here is the first second of my data set: RecordFile YTSIMTMD RBDDLO_0 RBDDGS_0 IDLWMWC1 …
florian
  • 604
  • 8
  • 31
0
votes
1 answer

Understanding small-scale Gouraud Shading with an example

I am in a computer graphics course and have just passed the lecture on Phong and Gouraud shading. I didn't really understand what was being said, so I turned to the textbook for clarification and found a workable example that might help me out. I'd…
0
votes
1 answer

C - Bilinear scaling (interpolation) byte by byte

UPDATE: Code is OK now, see edits at the end of question I'm writing a simple application that is supposed to scale given image and display the result on the screen. Image loading, displaying etc is achieved throught SDL, but I still have problem…
MJBogusz
  • 83
  • 1
  • 8
0
votes
1 answer

Interpolating Between 2D Vector Fields, or 2D vectors in 3D space

My program creates 2D vector sheets that model wind data in a 3D space. I'd like to know how I can interpolate between those 2D sheets. X and Y values won't vary because they correspond to lat/long values that remain static. the W component of the…
0
votes
1 answer

Reverse Interpolation

I have a class implementing an audio stream that can be read at varying speed (including reverse and fast varying / "scratching")... I use linear interpolation for the read part and everything works quite decently.. But now I want to implement…