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
0 answers

Curved lines appearing after log transform in ggplot when values are interpolated in R

I have created the following dataframe library(data.table) require(wrapr) library(readxl) library(dplyr) library(tidyr) library(ggplot2) library(plotly) df <- data.frame("X_Frequency" = c(5, 10, 55, 180, 300, 360, 1000, 2000) , …
Raghavan vmvs
  • 1,213
  • 1
  • 10
  • 29
0
votes
1 answer

Linear 1D interpolation on multiple datasets using loops

I'm interested in performing Linear interpolation using the scipy.interpolate library. The dataset looks somewhat like this: DATAFRAME for interpolation between X, Y for different RUNs I'd like to use this interpolated function to find the missing…
SSM
  • 62
  • 8
0
votes
1 answer

Writing a linear interpolation function in MATLAB

I'm trying to write a linear interpolation script in matlab. How do I fix that the vectors are of different length? I've tried to wrap my head around this issue, but can't seem to get it. Should an if statement be included anywhere in the for…
geggy
  • 13
  • 2
0
votes
0 answers

Resampling data with gnuplot

In some cases you might need to resample your data. How can this be done platform-independently with gnuplot? Below is one attempt. The dataset $Dummy contains the interpolated values, however, with a lot of unnecessary lines containing NaN. The…
theozh
  • 22,244
  • 5
  • 28
  • 72
0
votes
0 answers

MySQL: Interpolate monthly values from daily recordings

I would like to calculate monthly meter values from irregular readings. My data looks like this: | Date | Meter Reading | -------------------------------- | 2018-01-01 | 1.200 | | 2018-03-22 | 2.800 | | 2018-05-19 |…
AntonSack
  • 1,021
  • 2
  • 25
  • 47
0
votes
1 answer

linear spine interpolation of time-series by groups

I am dealing with a time series of balance sheet of thousands of listed companies from 1990-2018. In some years I only have annual balance sheet while in other years I have 5 balance sheets, including 1 annual and 4 quarterly balance sheets. I am…
YellowRiver
  • 65
  • 1
  • 7
0
votes
1 answer

Linear interpolation R

I have this data.frame (12x2)called df_1 which represents monthly values : month df_test [1,] 1 -1.4408567 [2,] 2 -1.0007642 [3,] 3 2.1454113 [4,] 4 1.6935537 [5,] 5 0.1149219 [6,] 6 -1.3205144 [7,] 7 …
0
votes
1 answer

Fastest Method to compute Linear interpolation between 2 points in QT using OpenGL

I'm trying to interpolate a triangle with the help of vertex coordinates. a |\ | \ | \ | \ b|_ _ _ \c I'm interpolating the vertices in this order (b,a),(a,c)and (c,b). Here the a,b and c are the 3 dimensional coordinates with a color…
aadhithyan
  • 49
  • 10
0
votes
1 answer

Interpolate missing Data

I have data in excel , I need fill missing (blank) data, the input data is like: row1 --> 1 2 3 blank 5 6 blank blank 9 10 row2 --> 2 4 blank blank 10 12 14 blank 18 blank the VBA code must read each rows and…
Arash
  • 148
  • 1
  • 9
0
votes
0 answers

Pandas linear interpolation always replace with the same value

I am performing a linear interpolation with a Pandas Series but it seems that it keeps replacing the NaN with the same value and I can't figure out why.. # To check where are located the missing values : d1[d1.isna().any(axis=1)] …
AlexM
  • 231
  • 2
  • 13
0
votes
0 answers

Python: Data Interpolation: working with interpolated functions

I have several (denoted by index i) sets of datapoints (x,y) stored in vectors x_i and y_i. x_i is not necessarily of the same lenght as x_i+1. I want to interpolate the data for every i separately and then work with the interpolated functions…
0
votes
1 answer

Android circle reveal animation not smooth

am creating login and signup in same page with circle reveal animation ,switch the view using a floating action button, it very lag when switching one view to another view, Login page Contain two relative layout and a floating action button one…
0
votes
0 answers

C# Efficiently Linearly Interpolating through n numbers with a sample rate x

I have a jagged float array chunks (float[][] chunks), and I want to interpolate each chunk of floats (with length n) with a sample rate of x. For example, if chunks[0] was {1f, 5f, 10f} so n = 3 and lets say x = 12, I want: 1.0000 1.7273 …
Mini
  • 445
  • 5
  • 17
0
votes
1 answer

How to interpolate the position of a point on a line given the distances to the interpolated point

I wish to write a C code where I can find the position of a point on a line between two points in a 2D coordinate grid. The two points positions I know, as well as each of the points' distances to the new desired point. However, I do not wish to use…
user9914667
0
votes
1 answer

How to plot interpolate station data over a map (basemap)?

I've got a file with accumulated rainfall over a month in 5 stations. There are lat, lon and rain data in csv file. My file is just like that: Out[18]: lat lon rain 0 -48.379000 -1.067000 213.0 1 -48.435548 -1.401513 157.2 2…