Questions tagged [interpolation]

Interpolation is the process of estimating the values of a function, when the function's values are known only at a particular set of points. Questions on interpolation in one or more dimensions, as well as algorithms for doing so, should have this tag.

44 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
272 views

Integrating highly oscillatory functions

I have a logarithmic grid, upon which i have two functions that are similar to this one (this is only the last 100 points): These are essentially very similar to a Sin function at this point. I need ...
5
votes
0answers
688 views

Cressman interpolation and objective analysis

I have read this question and answer – Interpolation of scattered data to a regular grid in python and I am doing something similar as I have temperature values of the atmosphere at different heights ...
5
votes
0answers
75 views

Automatic differentiation of barycentric rational functions

By a barycentric rational interpolant we understand a function of the form \begin{align*} r(t) := \frac{\sum_{i=0}^{n-1} \frac{w_i y_i}{t-t_i} }{ \sum_{i=0}^{n-1} \frac{w_i}{t-t_i}} \end{align*} In ...
5
votes
0answers
67 views

Padua-type pointset for functions singular on line $x=y$

The Padua points $\mathrm{Pad}_{n} \subset [-1,1]^{2}$ are a unisolvent pointset with optimal growth of Lebesgue constant, described in detail here. With some work they can be used to generate a ...
5
votes
0answers
173 views

How to optimally choose points for multivariable Hermite interpolation?

I have a multi-variate, continuous function $f$ from $R^n$ to $R$, which I can query for its output for any input. I would like to create interpolation polynomial for it. In one-dimensional case ...
5
votes
0answers
87 views

How do I perform chebyshev interpolation from a to b with custom angle range?

Typically Chebyshev interpolation from $-1$ to $1$ with angle from $0$ to $\pi$: $\xi_j=\cos \left ({\pi j \over N}\right )$ $x_j=(1+\xi_j) * {L \over 2}$ $w$: $w_0=\pi/(2N)$ $w_{1,...,N-1}=\pi/(N)$...
4
votes
0answers
89 views

Can I make this numerical integration continuously differentiable?

Suppose I have the discrete values $f(x_i)$ for every discrete value $x_i$ greater than some $\varepsilon$, and I want to numerically calculate the following integral: \begin{equation} n = \int_\...
3
votes
0answers
140 views

Derivative of Whittaker-Shannon interpolant

Last time we looked at how to improve the accuracy of Whittaker-Shannon interpolation, where user njuffa demonstrated that judicious use of sin_pi could greatly ...
3
votes
0answers
117 views

WENO5 scheme in a staggered grid

I'm trying to use the finite-difference WENO scheme to solve the 2D density conservation law with axial symmetry (coordinates $r,z$): $\frac{\partial \rho}{\partial t}+\nabla \cdot (\rho \vec{v}) = \...
3
votes
0answers
48 views

1D irregular interpolation with $O(1)$ or $O(\log(N))$ evaluation

In Floater's paper on barycentric rational interpolation, he shows that a stable interpolant using irregularly space points can be evaluated in $O(N)$ operations. For equally spaces samples, cubic b-...
3
votes
0answers
482 views

Gradients of non-uniformly sampled data in 3D space

I have measurements of magnetic field on a 3d grid. My measurements are distributed on four x-y planes similar to what is shown in the image below. The measurements roughly follow a Cartesian grid but ...
2
votes
0answers
33 views

Are planar 2nd order NURBS curve segments exactly the segments of conic sections?

I think it is well known that 2nd order NURBS curve can describe any segment of a conic section. Such a segment has 7 degrees of freedom, take an ellipse arc for example: the ellipse itself has 5 ...
2
votes
0answers
71 views

1-D local interpolation of sampled function that is polynomial in 1/x

I have a number of evenly-spaced samples of functions that are polynomial in $1/x$ where $x$ is a continuous variable on $x\in\left[a,b\right]$, i.e. $$f(x_i)=\sum_{n=0}^{N} f_n x_i^{-n}.$$ I want to ...
2
votes
0answers
301 views

trigonometric interpolation with non-equidistant sampling

I want to interpolate a periodic function on a non-equidistant grid and have implemented it the using the Lagrangian formula described in wikipedia. For an odd number of data points, this takes the ...
2
votes
0answers
27 views

Choosing suitable polynomial degree based on information in advection stencil

I'm working on a finite volume advection scheme for unstructured meshes which uses a multidimensional polynomial weighted least squares fit for interpolating from cell centres onto faces. In 2D, the ...
2
votes
0answers
182 views

NURBS surface fitting for a closed region on mesh

I'm developing a tool that allows users to select a closed boundary (a polygon) on the triangle mesh and then from this boundary, generate a NURBS surface fitting the original mesh surface. My idea ...
2
votes
0answers
158 views

How do I implement thin plate splines with barriers?

I want to implement thin spline interpolation of scattered elevation data $ \{z_i(x_i,y_i)\}_{i=1..n} $ in C++. This seems fairly simple using Radial Basis Functions: $$ z(x,y) = p(x,y) + \sum_i l_i\...
2
votes
0answers
50 views

Propogated Error in Mesh Interpolation

I am working with a code that solves diffusion/reaction equations on a 2D unstructured mesh. Due to the stiffness of some of the processes, I start with time steps near 1e-13, and end with a final ...
2
votes
0answers
105 views

Resampling of values between body fitted and cartesian grids

Assuming there exist two 2D grids on the same domain, one of them is a cartesian one while the other is curvilinear (body fitted regular grid, with curved coordinate lines). I am looking for a way to ...
1
vote
0answers
50 views

Spline interpolation for vector-valued data in 3D space

I have output from a 3D linear elasticity finite element simulation which uses linear tetrahedral elements, such that the displacement is continuous over the nodes but the gradient is not ($C_0$ ...
1
vote
0answers
39 views

Interpolate location based on triangular sensor array

There are 3 sensors (A, B, C) on a plane, located in the corners of a (known) equilateral triangle. I want to calculate the (2D) location of an object (X) inside that triangle. One sensor returns one ...
1
vote
0answers
68 views

Interpolation of a Concave Mesh

I would like to have an algorithm that interpolates the values attached to nodes in a concave mesh mesh. To be me precise, assume we have a point cloud P (e.g. in 3 dimensions) and a list of edges E ...
1
vote
0answers
71 views

How to approach geographic data interpolation by distance?

let's say I have a set of geographic locations (lat, lng) resulting from a query. Those locations have some kind of internal ranking, my set is sorted by this number in a descending order. Now I'm ...
1
vote
0answers
90 views

Grid Data Interpolation

What are the most sophisticated methods for interpolating a scalar field say Electric or Magnetic Field on a 3-D grid? I have scalar data on a meshgrid with equal spacing. I would like to use an ...
1
vote
0answers
84 views

Find B-spline coefficients from values on collocation points

The context of my question is how to compute high order derivates on direct numerical simulation of turbulent channel flow. It is of particular interest for fluid dynamics and turbulence research. I ...
1
vote
0answers
359 views

Numerical integral of oscillating function with known zeros

I have a function that I need to numerically integrate from $0$ to $+\infty$, given by: $$I = \int_0^{+\infty} \mathrm{d}x\,x\,T^2(x)f(x)$$ where $T^2$ is an interpolated function that goes to $1$ ...
1
vote
0answers
489 views

Polynomial approximation - Vandermonde matrix creation - precision

I am trying to fit a polynomial through 340 points in a 3D space, i.e. $$f(x,y,z) = k$$ I asked previously about the theory behind polynomial interpolation here -> Polynomial interpolation Few ...
1
vote
0answers
304 views

How to perform Taylor series expansion consisting of cell averaged derivatives in a computational element?

I have encountered the term cell "Cell averaged derivatives" and "Taylor series expansion using cell averaged derivatives about centroid" in the context of polynomial representation in any cell (...
1
vote
0answers
183 views

Integral image resizing

I'm trying to find an approach for integral image resizing. I found out that I can do it with a bilinear interpolation method, but with this approach I can only resizing by the factor which is a power ...
1
vote
0answers
126 views

computational tool for higher order Lagrangian interpolation for finite element

In finite element, I can calculate the Lagrangian interpolation shape functions for each degree of freedom in an element, from the the number of nodal degrees of freedom and the number of nodes ...
1
vote
0answers
64 views

Sensitivity Analysis -- Total Variation for a function with categorical arguments?

I have an application in sensitivity analysis of complex system models with moderately nonlinear interactions between arguments Arguments potentially dozens or hundreds in number Arguments mostly ...
1
vote
0answers
153 views

C1 continuous spline on regular 2D-grid with quadratic 1D cuts

I want some scalar spline function defined on regular 2D grid $F(x,y)$ with continuous first derivative which is easy to intersect with arbitrary ray/line ${\vec l}(t) = (c_x t,c_y t,c_z t)$. ...
1
vote
0answers
82 views

A linear polynomial that is the minimax (best) approximation to $f(x)$ on the interval $[-1,1]$

Suppose you have the following analytical information about a function $f(x)$ on $[-1,1]$: \begin{align*} f(x) &= \frac{1}{x+3}\\ f'(x) & = -\frac{1}{(x+3)^2}\\ f^{''}(x) &= \frac{2}{(x+3)...
1
vote
0answers
944 views

linearly interpolate and determine gradients for data on non-uniform grid

I have measurements of a quantity on a 3d grid. My measurements are distributed on four x-y planes similar to what is shown in the image below. The measurements roughly follow a Cartesian grid but ...
1
vote
0answers
309 views

Calculating lagrange polynomial for 100 points?

I need to calculate the lagrange polynomial which approximates $e^x$ at $101$ points, the points $\frac{k}{101^2}$ for $k\in\{0,1,2\dots 100\}$. I tried the following code: ...
1
vote
0answers
208 views

End conditions on cubic splines interpolation

I'm currently working on cubic splines interpolation. My question has to do with the end conditions. Instead of using natural or clamped cubic splines, I am asked to use the following condition : $S_{...
1
vote
0answers
60 views

Comparison between of higher order interpolations

A while ago I came up with an algorithm which can be used to numerically solve optimal control problems, which basically came down to discretizing the control input $u(t)$ and interpolating this to ...
1
vote
0answers
91 views

Gauss Integration over Zero Order Element

I'm working with the Boundary Element Method and want to integrate an expression over a triangular region. I would like to use Gauss Integration to do this, but I'm having trouble since the triangular ...
1
vote
0answers
764 views

Fast way to compute barycentric lagrange interpolation

Is there any fast way to compute the barycentric Lagrange interpolation using matlab? something more faster than using repmat instead of for loops
1
vote
0answers
61 views

Mass-conservative reprojection (on a sphere)

I have a 2D distribution of mass on a sphere given as a matrix of masses in latitude-longitude grid cells. I need these masses projected to another grid on the same sphere with different location of ...
1
vote
0answers
30 views

Combining trend estimation and constrained Marquart fit

This title certainly needs some clarification: I need to compute parameters $a_i$ for a helper function $f(\vec{a};k)$ (for grid interpolation) which is fitted to a number of values $y_k$ which are ...
0
votes
0answers
100 views

How to interpolate stress at unknown points from the stress values available based on geometrical position for constant load?

I am working on a combined contact, bending, and torsion problem. I have data on geometrical points and their instantaneous stress components. However, based on the available data, I have to ...
0
votes
0answers
43 views

extrapolation/interpolation in fmincg.m

Can you tell me these equations come from where in MATLAB fmincg.m? ...
0
votes
0answers
39 views

Cardinal B-Splines with derivative information

Have Schoenberg's cardinal B-splines been extended to accept derivative information at each knot, similar to how Lagrange interpolation can be improved by Hermite interpolation?