Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
39 views

Finite Element Nodal Point Field Variable Recovery

I am working on a program which takes values computed at the quadrature points from the finite element method and extrapolates them to the nodal points. I am working with a 10 node tetrahedral element ...
13
votes
6answers
1k views

Example of a continuous function that is difficult to approximate with polynomials

For teaching purposes I'd need a continuous function of a single variable that is "difficult" to approximate with polynomials, i.e. one would need very high powers in a power series to "fit" this ...
5
votes
0answers
89 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 ...
0
votes
1answer
94 views

Python - Fitting a function to data without using Scipy

I'm trying to write a program in python which doesn't need to use extra packages like numpy and scipy. In one part of the project, if I can interpolate a function to a set of data, I can save ...
5
votes
2answers
150 views

Polynomial approximation spaces

I often see people using products of 1-D polynomials to do interpolation or projection of smooth multivariate functions over grids or cells because it is intuitive and simple to implement. What are ...
8
votes
1answer
151 views

What are these oscillations?

I have a function $g(x)$ defined numerically that is sort of in between a Gaussian and a Lorentzian. It decays much slower than a Gaussian, but still faster than a simple inverse power. I need to ...
1
vote
1answer
50 views

Wanted: smoothing time domain transform

Let $A$ be a finite (and small-ish) set of positive real numbers and 0. Let $B$ be a subset of $\mathbb N^0$, up to some (small-ish) bound. I have a function $f(t)$, $A \rightarrow B$ that is ...
4
votes
0answers
63 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 ...
7
votes
3answers
125 views

Evaluating an integral numerically at many points

Given a real function $f$, how can one efficiently evaluate $\int_0^{a_i}f(x)dx$ for millions of different $a_i$? Applying a standard quadrature method (such as Simpson's rule or Gaussian quadrature) ...
2
votes
0answers
28 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
1answer
336 views

Three dimensional irregular grid data interpolation to regular grid

I have three-dimensional radar reflectivity data obtained as voxels (scans, rays, altitudes). The data has been sampled at irregular spacings and I want to convert this into a regular grid. In ...
5
votes
0answers
60 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
2answers
95 views

Interpolate the orbital coordinates of an object using coordinates and velocities vector

I have a table of the orbital coordinates and velocities of an object with time steps of 1 minute. Now I would like to interpolate this to a finer time increments with time steps of the order of 1 ...
3
votes
0answers
44 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-...
5
votes
1answer
83 views

Interpolation estimates for $H^1$ into $P_1$

As far as I can tell, nodal interpolation estimates proven with Bramble / Hilbert require higher regularity of the functions being interpolated. E.g. with linear elements in 2 dimensions, one needs $v ...
0
votes
1answer
487 views

Numpy.polyfit with regularization

I am trying to use the numpy polyfit method to add regularization to my solution. My non-regularized solution is ...
3
votes
2answers
387 views

Polynomial Interpolation with Matlab polyfit

Given $N$ data points, does polyfit of degree $N-1$ produces the unique interpolating polynomial? For concreteness, here is a code example: ...
0
votes
2answers
218 views

How to represent CFD result when I use grid-centered FVM?

My variables are stored at the center of the cells. How can I transfer these values to grid points? If I calculate the algebraic average value there may be a shock.
1
vote
1answer
80 views

Approximate function with minimum number of evaluations

I'm trying to approximate an unknown, non-linear function $f: A \to \mathbb{R}$ (in my case: $A = B \times B$ where $B$ is an infinite but compact subset of $\mathbb{R}$). That is, evaluating $f$ is ...
1
vote
1answer
110 views

Barycentric interpolation equivalent for irregular hexahedra

I have a mesh with irregular hexaedra and I need a fast way to interpolate values at points inside these cells. I know that trilinear interpolation does not work well for large skews. Barycentric ...
2
votes
0answers
44 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 ...
1
vote
0answers
52 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 ...
0
votes
1answer
152 views

Find hidden sequence $a_n = a_{n-1} + T $ , with period $T$, given some “random” numbers

I have this data plotted on a graph in which all points have the same value on the y-axis, e.g a constant integer "c", while the x-axis is the time in seconds. So, for a c = 25 on the y-axis, there ...
1
vote
0answers
104 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
289 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 ...
0
votes
1answer
95 views

Underdetermined/overdetermined polynomial interpolation

I am trying to apply a polynomial interpolation to 340 points in a 4D space, i.e., $$f(x,y,z)=k\, .$$ What I would like to understand is this: if I use a 6th order polynomial I will end up with 343 ...
1
vote
2answers
262 views

Vandermonde matrix DG Hestaven

I am trying to understand the nodal and modal basis formulation from the book of Hesthaven (Nodal Discontinuous Galerkin Methods, Hesthaven, Jan S., Warburton, Tim). For $N=2$, I get the Vandermonde ...
4
votes
1answer
177 views

Interpolating a mathematical function using a Hermite Cubic Finite Element Space

I have a Hermite Cubic Finite Element Space on a computer in the form of Matlab m-files. More specifically, I can evaluate four "shape functions" $N_1, N_2, N_3,$ and $N_4$, for which the following ...
0
votes
2answers
196 views

What would be a good, fast, way to interpolate a point in 3D space

So I have a 3D mesh made of elements with eight nodes, 12 sides per cell, and in the course of my simulations, I would have to interpolate data from those nodes onto a point inside the cell with a ...
1
vote
1answer
64 views

Fast table interpolation on regular time data for ODE

I am using scipy.integrate.odeint to simulate the reaction of a system with known input signals via integration. The simplified code below illustrates what I'm ...
2
votes
2answers
216 views

Parametrized spline - oscilating second derivative

I am using a parametrized natural spline to interpolate 2D curves. For example something like this: Where I parametrize both the x and the y coordinate with a parameter that increases by one between ...
4
votes
2answers
65 views

Bounded approximation to a bounded function

I have a non-negative function $f(x) \ge 0$ defined on the interval $[a,b]$. I would like to have a finite-dimensional approximation to this function that is guaranteed to be non-negative on $[a,b]$. ...
2
votes
1answer
90 views

Higher order interpolation in DWR method

Based on page $35$ of the book: (W. Bangerth and R. Rannacher, "Adaptive Finite Element Methods for Solving Differential Equations", Birkhäuser, 2003,) for computing the error in dual weighted ...
1
vote
0answers
185 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 (...
3
votes
2answers
215 views

Given x,y,z data of a periodic object, calculate the period of the object (if possible)

So the problem I am working on is as such. Given the x,y,z data of a periodic object over time (from the origin in 3d space) (need not be uniform), calculate the period of the object (if the data ...
1
vote
0answers
131 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 ...
6
votes
2answers
101 views

Computing inverse functions of functions of two variables

There are several functions of two or three variables that I am working with. For this question I have made a small set showing the resistivity, $\rho$, in n$\Omega$m, of copper as a function of its ...
3
votes
2answers
122 views

citations for numerical lookup table interpolation of P/ODE(s) RHS

I'm not sure that this *overflow is right place to ask.... Sorry if it is off topic. Does anyone know a citation (scientific article or book) for a numerical trick (method), when we tabulate a right-...
3
votes
1answer
394 views

Chebyshev approximation by projection vs interpolation

Suppose we want to approximate a function $f: [a, b] \rightarrow \Re$ with a Chebyshev series: $$ f(x) \approx \sum_{k=0}^n c_k \, T_k\left( \frac{2x-b-a}{b-a} \right) $$ where $T_k(x) = \cos(k\, \...
1
vote
1answer
133 views

Line integral along the edge of an isoparametrically mapped quadrilateral

I need to integrate a function along the edge of a quadrilateral (boundary integral). For example, the function is $f(x,y)=x^3+y^3$, the quadrilateral coordinates are $(0,0),(2,-1),(3,2),(1,3)$ and ...
6
votes
0answers
100 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 ...
1
vote
0answers
95 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 ...
4
votes
1answer
163 views

Methods for interpolating from points that are not on a regular grid?

I'm working on a project where I'll need to be able to interpolate scalar potential values at arbitrary points in a 3-D box from a large (potentially millions to billions of points) collection of ...
0
votes
3answers
97 views

Polynomial reconstruction on unstructured grids

For a 1D grid I can calculate a Lagrange polynomial through an arbitrary set of points for the reconstruction of a polynomial function. In 2D I have an unstructured grid and want to interpolate the ...
1
vote
1answer
82 views

Using two reference values for a scalar variable: What's the name of this type of problem?

I don't really know where to ask this one... In fact, I am not sure I can define it properly. Here goes... Let's say I take measurements. In order to "normalize" these measurements, I divide their ...
0
votes
2answers
124 views

Integrate result of finite element calculation in MATLAB

I have a PDE that I solve in MATLAB over a 2D domain using the "recommended workflow", i.e. the functions descg, ...
1
vote
0answers
56 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 ...
0
votes
1answer
382 views

Interpolation of velocities on staggered grid (in PIC)

Edit: (copying from my comment) Let's consider the inverse problem when I need to transfer velocities from particles to the grid (inverse bilinear interpolation). How'd I transfer a particle's x-...
1
vote
0answers
83 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)$. ...
0
votes
1answer
66 views

Interpolation over an unequally spaced grid

my aim is to interpolate a function like this: I have ...