# 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 [tag:string-interpolation].

**0**

votes

**0**answers

5 views

### Is there much faster way to substitute 'scipy.ndimage.interpolation.zoom'?

I'm trying to resize my 3D images (voxels with shape '1, x, y, z') to fixed-size images, say ('1, 100, 100, 100').
I have tried the followings,
zoom(input_image, scale, order=1)
skimage....

**0**

votes

**0**answers

5 views

### Interpolation on n-dimensional grid impossible through scipy.interpolate.griddata

I have an array of observations called values which comes from a function defined the following way:
values = np.array([oscillatory(i) for i in range(points.shape[0])])
values has shape (65,1), ...

**0**

votes

**0**answers

6 views

### Catmull-rom and Akima not including part of curve?

My original image is a fragmented curve which I've skeletonized to reduce the number of points. I'd like to join the curve together using a method which might also work for images that are straight ...

**0**

votes

**0**answers

12 views

### Performing an ordinary kriging on MATLAB

I'm trying to use the function from the following link to perform an ordinary kriging on my data in MATLAB!
https://www.mathworks.com/matlabcentral/fileexchange/29025-ordinary-kriging
It seems simple ...

**0**

votes

**0**answers

22 views

### Interpolating (kriging?) Grid Data in MATLAB

I have Lat, Lon, and NO2 data that are gridded. I'm trying to select a few points from this data and interpolated out some data/a plot, comparing how this interpolated data/plot improves as I ...

**1**

vote

**2**answers

45 views

### How can I create spark udf for interpolation of float to INT and how can I write better logic than I have done

Below is my Spark Dataframe I want to do interpolation and write a Spark UDF for this I am not sure how can I write better logic and create a UDF from above
This is for converting Position_float and ...

**0**

votes

**0**answers

27 views

### Interpolation with forloop in query

I'm writing a query in a forloop and I don't know where I'm mistaking.
in a nutshell, what I need is to do a for loop and in the WHERE statement put the content of a dict.
Can someone help me?
...

**0**

votes

**0**answers

17 views

### How to make a spline interpolation with a defined slope on only one end?

I have some data that I would like to interpolate using a cubic spline in Matlab. My data is monotonically increasing, but the default spline result has a large downward curve that falls below zero.
...

**7**

votes

**1**answer

66 views

### How to interpolate a variable into a regex-pattern in the regex part of a substitution?

What do I have to change here to make it work?
my $str ="start middle end";
my $regex = / start ( .+ ) end /;
$str.=subst( / <$regex> /, { $0 } ); # dies: Use of Nil in string context
say "[...

**0**

votes

**1**answer

31 views

### Matlab Use function with structure parameter to interpolate

In MATLAB, I want to interpolate on a set of data using a function with the parameter input as a structure. However, I am receiving an error.
I have a structure:
fruit.apples = [3 4 2 3 4]
fruit....

**0**

votes

**0**answers

8 views

### Given a 10th percentile event in one variable, give me the corresponding 90th percentile value for a correlated variable

Let's assume I have a multivariate random normal generating function with some means, and covariance matrix.
I can use numpy to generate data using:
import numpy as np
import pandas as pd
means = [...

**0**

votes

**1**answer

17 views

### Interpolating a data series of longitude and latitude coordinates - Error in input data

I would like to perform a interpolation based on a set of Longitude and Latitude values.
I tried this with the library SciPy.interpolate. The code shown below also works without problems on simple ...

**0**

votes

**0**answers

11 views

### How to interpolate data to a different sampling frequency?

I have a pandas dataframe with a sampling period of 18 seconds I want to do linear interpolation and have a value every 9 seconds.
So the dataframe looks like this
timestamp,c0
2016-01-01T00:00:12....

**0**

votes

**0**answers

14 views

### 3D interpolation of display RGB using display XYZ and RGB

I am working on a display and I want to interpolate RGB values from XYZ. I used devices to measure XYZ value corresponding to the RGB (9x9x9) values. Now, I have XYZ of my image and I want to convert ...

**1**

vote

**1**answer

25 views

### How to “stretch” my dataframe and interpolate in between existing values

I'm stuck with a simple DataFrame.reindex().interpolate() problem because the dataframes I am using don't have a datetime index.
I have DataFrame1: t that looks like this:
In[1]: import pandas as pd
...

**1**

vote

**1**answer

71 views

### Interpolating matrices with 2 variables and 1 dependent value

I'm analyzing an induction motor, varying the frequency and absolute value of the stator current. Since the FEM-Tool only works with a current input, I need to vary the current over the frequency to ...

**0**

votes

**0**answers

17 views

### How to fill in the empty space in between images for volumetric imaging/ 3D reconstruction in matlab

I am trying to create a 3D model of packed spherical beads with image slices. These images are of spherical beads with varying diameters, taken 0.0015 apart. The cube is 2.154x2.154x2.154. I was able ...

**2**

votes

**0**answers

25 views

### Interpolate two-dimensional numpy array with respect to the periodicity of the values

I have points (x, y) with a value (z) which is periodic in pi, i.e. zero is the same as pi. The points are very coarse so I need to interpolate them.
I tried interpolating the values with griddata() ...

**0**

votes

**0**answers

33 views

### I need to smoothly interpolate an object with position x, y, z to multiple 3D points in a row

I have an ArrayList of 3D points as such:
ArrayList<float[]>
These points are placed in a ring around 0,0,0. Right now I have my ring generation code just add 24 3D points to this array (360 ...

**0**

votes

**2**answers

25 views

### Conditional interpolation with subject

I have an Subject which provides me with number. In my template, I would like to render this number in braces, if it is higher than 0.
Theoretically something like this (this does not work though):
...

**0**

votes

**2**answers

50 views

### Does Angular handle interpolation and one way binding the same way?

I am currently creating an application that frequently changes the text and images on a page. Chrome consumes almost the whole cpu after a few hours of running. Please note that it is not an option to ...

**0**

votes

**0**answers

19 views

### jQuery/CSS interpolation doesn't add anything to the element

I am adding a width to an element using jQuery, but when i use a variable, it doesn't add anything.
This works perfectly when i replace the js variable with a number, but doesn't work at all when i ...

**-1**

votes

**1**answer

37 views

### Interpolation Errors, plot function does not generate proper lines when running

I am trying to get a graph made for my interpolation program (basically it takes a test function and creates lines utilizing an interpolation method)
clear all;
close all;
clc;
x1= [-1 0.75 -0.5 -0....

**0**

votes

**1**answer

12 views

### Color interpolation with a set of 2D points

I am trying to modelize a physical problem of photoelasticity on a surface. I succeed to get an array of X,Y - coordinates of the surface and for each points I have a corresponding color in a RGB ...

**0**

votes

**0**answers

18 views

### Linear Interpolation with krige-Function in R

I'm doing a regression kriging in R and have already done the ordinary kriging with the residuals which worked absolutely fine. Now I want to do the linear regression with three prediction variables ...

**0**

votes

**1**answer

21 views

### Python | How interpolate two measurements such that the x-values are the same

I have two measurements consisting of x and y value pairs. I want to calculate the difference between these two series. The problem is that I cannot simply calculate the difference between these two ...

**-2**

votes

**1**answer

14 views

### How to calculate “in between results” based upon given reference list with additional serial number identification?

For (almost) each technical visit there is a record:
SERVICE DATE / MACHINE #SN / HOURS OF OPERATION
in Table A (all machines in the same list).
All installed spare parts are recorded with
DATE ...

**0**

votes

**1**answer

34 views

### Intrepolating between two data frames

i have two data frames
a=
x y
10 10
47 9
58 8
68 7
75 6
80 5
b=
x y
45 10
55 9
66 8
69 7
79 6
82 5
I want to interpolate between them and generate new data frame with N sampling ...

**1**

vote

**1**answer

30 views

### How do I interpolate values for blank rows column-wise within the same row name, and then copy the interpolated data to the original DataFrame?

I have a spreadsheet that gives the statistics of the 2019 World Happiness Report which will be later used in a visualization and linear regression problem (it is a group project and my part is ...

**0**

votes

**1**answer

17 views

### How to apply na.approx to a row in a matrix?

I am trying to make an interpolation for all the rows in a dataframe. I am using apply(data_final,2,na.approx). This make the interpolation for the values but some are out of range.
If I use na....

**0**

votes

**0**answers

29 views

### Cubic extrapolation equation in fmincg.m

Can you tell me these equations come from where in MATLAB fmincg.m?
A = 6*(f2-f3)/z3+3*(d2+d3); % cubic fit
B = 3*(f3-f2)-z3*(d3+2*d2);
z2 = (sqrt(B*B-A*d2*z3*z3)-B)/A; % numerical ...

**2**

votes

**2**answers

58 views

### Angular - Cannot concatenate values in HTML page

In our Angular project, we use interpolation as shown below, but we also need to use this interpolated value in the [state] property. But we haev not managed so far. Any idea?
If we set id values as ...

**2**

votes

**1**answer

19 views

### Trouble formatting x and y data in gekko's bspline function

I am trying to perform 2D interpolation in GEKKO, and have the x,y, and z data. However, when I input them into the bspline function, I get the error "x_data and y_data must be strictly increasing". ...

**0**

votes

**0**answers

40 views

### Interp2 function returns faulty interpolated matrix

I have a question concerning the interpolation 2 function. I am trying to interpolate some data matrix which is in respect to a cartesian grid. I have to interpolate the data to a polar grid (not with ...

**3**

votes

**0**answers

60 views

### Find (x,y) subpixel coordinates of a maximum using discrete quadratic interpolation

I have to find the subpixel (x,y) coordinates of the maximum value given a set of discrete points.Im ny case, I run cv::matchTemplate function that slides a model window along an image and returns a ...

**0**

votes

**0**answers

12 views

### Invalid “times” argument in R package “fields”.. Fail to solve it

I am trying to interpolate some NAs of an environmental dataset.
The error that is shown to me is:
"Error in rep(0, n1 * n2) : invalid 'times' argument
In addition:
Warning message: In n1 * n2 : ...

**1**

vote

**0**answers

11 views

### How to generate a 3D array of data based on a 1D array of data and three 1D arrays of spatial coordinates

I have 3D scattered data that I need to interpolate. My chosen interpolation method requires inputs of (x,y,z,v) where:
(x,y,z) spatial coordinates of original grid (1D or 3D arrays)
(v) values ...

**0**

votes

**1**answer

30 views

### Using interpolation outside function definition in solution using Runge-Kutta 4th order

I have written MATLAB code to solve the following systems of differential equations.
with
where
and z2 = x2 + (1+a)x1
a = 2;
k = 1+a;
b = 3;
ca = 5;
cb = 2;
theta1t = 0:.1:10;
theta1 = ca*...

**0**

votes

**0**answers

12 views

### Interpolation/Extrapolation 3D Marker Coordinates

I have x,y,z coordinates for 3 markers (Thigh.1, Thigh.2 & Thigh.3) fixed on a rigid pad tracking the motion of the thigh during running. Trials are generally ~100 frames long. For some trials the ...

**-2**

votes

**0**answers

21 views

### interpolate a closed surface in python

I have a set of 3-dimensional points that are scattered on the surface of a closed object, which has roughly the shape of an ellipsoid. Now I need to find all points on a 3-dimensional cartesian grid ...

**0**

votes

**0**answers

37 views

### How do I interpolate between file creation dates?

I have a GoPro Hero 4. The watch chip seems to be broken.
Each time the battery becomes completely empty, the clock sets itself to approx. 01.01.2015 00:00:00.
If I see that, I set the time again ...

**0**

votes

**1**answer

50 views

### plot image with interpolation in Python Bokeh like matplotlib?

Is there any way to plot 2D array as an image using Bokeh with interpolation like in Matplotlib? I am able to plot using an example: https://bokeh.pydata.org/en/latest/docs/gallery/image.html
However, ...

**1**

vote

**1**answer

20 views

### Interpolate bounded pixels in python

I have a matrix of values between 0 and 1.
The matrix consists of blocks of values which are the same, but with different widths.
The image below is a visual picture of this matrix.
I would like to ...

**0**

votes

**0**answers

10 views

### Peak correlation and interpolation between two data sets

I have a bunch of power data in the frequency domain that I wish to parameterize. I want to interpolate between two data sets and retain the harmonic relationships. Is there a Python package out there ...

**1**

vote

**1**answer

28 views

### Treat the missing values (conditional Imputation ) Pandas

I have a block in the processing of missing data
i have this df
index a b c del
2018-06-25 12:51:00 NaN NaN NaN 1
2018-06-25 12:52:00 NaN ...

**0**

votes

**0**answers

20 views

### interpolate sass values between breakpoints

I have backend data that is inserting a class into an html tag to force an image's ratio via sass/css with the padding-top trick. If you set an image's height and width to zero and only set the ...

**0**

votes

**2**answers

45 views

### Tagged template literals confusion [closed]

I'm at the point in my learning curve of JavaScript where I need to learn some more complex things to get better, and I'm starting with tagged template literals but I can't seem to wrap my head around ...

**1**

vote

**1**answer

46 views

### Storing data before passing it to interpolation routine

I'll begin by apologizing, because I'm entirely new to python(Fortran guy here), and have been learning on the fly. As a result, there are probably some pretty glaring holes in my knowledge that may ...

**0**

votes

**0**answers

25 views

### R-interp: Same input & output coords (x,y,xo,yo), multiple data value vectors (z). Can I skip some steps?

I have to perform multiple 2-d linear interpolations from the same input coordinates (x,y) to the same output coordinates (xo,yo). Only the data values (z) change every time (z1,z2,z3,...).
I have ...

**0**

votes

**0**answers

62 views

### Resample 2 vector array in Matlab and output in same dimension

How can I resample my [t x] matrix and fill the gap of resampled data with interpolation data in Matlab?
Input is the upper signal output is lower signal in the image.The output should be [tout xout]...