# Tagged Questions

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.

54 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 ...
102 views

### Second order interpolation scheme

On a grid I am having the values of a physical quantity say for example Temperature, at the E,W,N,S and P node all of them being calculated using a second order discretization scheme. I want a second ...
88 views

### Derivation in the FEM method

Can any on help me understand how from the simple delta function on the right hand and performing the integration we can get values as in the left? Note that $h = x_i + 1 - x_i$ The diffusion and ...
74 views

### How to implement Lagrangian/Polynomial Interpolation for my C++ Code?

I have a working C++ function: ...
92 views

### Does it have an effect to interpolate data before using Runge-Kutta?

I am going to calculate a trajectory, by using a pre-calculated vector field. The values of the field are known on a grid which is quadratic in the horizontal direction, un-evenly spaced in the ...
78 views

### Fit curve with rectangles

I have a one-dimensional set of points, i.e. $(n,y_n), 1\leq n \leq N$. I want to fit them with a linear combination of $k$ rectangular functions in a least-squared-error sense. Each rectangle is ...
122 views

### Interpolation with the roots of orthogonal polynomials & Spectral expansion

I'm a bit confused about the relationships between these two approximation methods mentioned in the title. Does this kind of interpolation also belongs to the field of spectral methods? Are the ...
115 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: ...
92 views

### Question on speed and accuracy comparisons of different 2D curve fitting methods

This may be a trivial question, and I apologize if so. Consider the following simple problem: We have a 2D, regular grid of points (say $X = [0,5000] \times [0,5000]$) spaced uniformly by units of 1 (...
14 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 ...
306 views

### Approximating a step function with polynomials

The Weierstrass approximation theorem says any continuous function $f(x): [0,1] \to \mathbb{R}$ can be approximated uniformly by polynomials. Given any $\epsilon$, we can find $p(x) = x^n + \dots$ ...
57 views

35 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 ...
583 views

### Interpolation by Solving a Minimization Problem (Optimization)

I will try to give the motivation behind this problem and later the math formality. Given a grayscale image (1 Channel - M by N Matrix). Someone marks some pixels as anchors. Now, you need to ...
137 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 ...
112 views

### How do I do Chebyshev interpolation in multi-dimentional space?

This topic is used in spectral methods, for collocation grid. Literature mentions Chebyshev interpolation on a grid (defined by $\xi_j = cos(\pi \cdot j/N)$, $x_j = (\xi_j+1) L/2$, $j=0,...,N$) ...
78 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)...
2k views

### Fortran, making a more efficient bilinear interpolation

I'm trying to write an efficient bilinear (2D)-interpolation, after reading some recipes, as a fortran-mex for Matlab that is used extensively throughout a long algorithm of solar image processing, ...