What is Interpolation: Definition and 154 Discussions

In the mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing new data points within the range of a discrete set of known data points.In engineering and science, one often has a number of data points, obtained by sampling or experimentation, which represent the values of a function for a limited number of values of the independent variable. It is often required to interpolate, i.e., estimate the value of that function for an intermediate value of the independent variable.
A closely related problem is the approximation of a complicated function by a simple function. Suppose the formula for some given function is known, but too complicated to evaluate efficiently. A few data points from the original function can be interpolated to produce a simpler function which is still fairly close to the original. The resulting gain in simplicity may outweigh the loss from interpolation error.

View More On Wikipedia.org
  1. C

    C/C++ Interpolation of a rapidly oscillating function

    I have an analytic function F(x,y,z) and grids in x,y and z. I would like to reproduce the values I get for F at a given x,y and z through carefully interpolating the values given in the grids I have in each of these variables. The problem is that in some part of the x,y,z phase space, namely...
  2. Y

    Mathematica Mathematica Interpolation function error

    Hello everyone, I am relatively new to Mathematica, and I am encountering an issue when trying to interpolate numerical data imported from an Excel file. Here are the steps I've taken: I imported the numerical data from an Excel file into Mathematica. I attempted to interpolate the data using...
  3. J

    Python Why backpropagation dominates neural networks instead of interpolation

    Hi guys, I was learning machine learning and I found something a bit confusing. When I studied physics I saw the method of least squares to find the best parameters for the given data, in this case we assume we know the equation and we just minimize the error. So if it is a straight line model...
  4. V

    Creating Plots using Matlab For Interpolation

    My code in Matlab for this practice question is: ( x = linspace(0,4,10); y = sqrt(x); plot(x,y,'-o'); hold on y2=polyfit(x,y,2); plot(x,y2,'--or') ) Is this the best way to do? My plots look nearly identical and are on top of one another but a later question asks to graph the error, so I am...
  5. M

    A Piecewise linear interpolation with uncertainties

    Hello! I have a function ##y = f(x_1,x_2)##, and I would like to do a piecewise linear interpolation. However, both the dependent (##y##) and independent variables (##x_1, x_2##) have uncertainties associated to them (the uncertainty is the same for a given variable i.e. all ##x_1## measurements...
  6. B

    I Uncertainties from linear interpolation

    Hello! I have a function of several variables (for this questions I assume it is only 2 variables), ##y = f(x_1,x_2)##. I want to learn this function using simulated data (i.e. generated triplets ##(x_1,x_2,y)##) and then use that function to get ##y## from measured ##(x_1,x_2)##. There is no...
  7. C

    Can I improve the sinc interpolation?

    Hello everyone. I am working with mathematica, where I have developed a two-dimensional shannon interplation, just as can be seen in the slides 15 to 18 of this presentation. The code is as follows: savedX = Table[XposX = mat[[All, 1]]; YposX = mat[[All, 2]]; windXVal = mat[[All, i]]...
  8. N

    Chemistry Help with this interpolation (change in entropy while heating water)

    Hello, everyone :). I try to resolve this common problem. But, when i got in the interpolation of state 2, the values not make the sense. I have 25 psia and 75 F, but, in the superheated water table, there are not values with 25 psia (only 20 psia and 40 psia). And, the temperature values...
  9. J

    Substitute PID Controls with a Polynomial Equation/Table?

    So, I had a discussion with a friend of mine, neither of us are in controls but I was curious about an answer here. In a PID controller, we essentially take in an error value, do a mathematical operation on it and determine the input (controller output signal B) needed to the actuator to produce...
  10. FEAnalyst

    I Logarithmic scale - interpolation

    Hi, knowing the coordinates of two points: ##(x_1,y_1)## and ##(x_2,y_2)## on a linear scale plot, I can use linear interpolation to get ##y## for a point of known ##x## using the formula below: $$y=y_1+(x−x_1) \frac{(y_2−y_1)}{(x_2−x_1)}$$ But how does it look like in the case of logarithmic...
  11. L

    MHB Simplifying lagrange interpolation polynomial

    Now $\sum_{i=0}^{10}(x_{i}+1) L _{10,i}(5) = (x_{0}+1) L _{10,0}(5) + (x_{1}+1) L _{10,1}(5) + ... + (x_{10}+1) L _{10,10}(5)$ Which I can further decompose into $\frac{(x_{0}+1)(5-x_{1})(5-x_{2})...(5-x_{10})}{(x_{0}-x_{1})(x_{0}-x_{2})...(x_{0}-x_{10})} +...
  12. user366312

    Interpolation in the Marching Square Algorithm

    Marching Square - article In the "Linear Interpolation" section This article discusses how to interpolate the values when the lines are oblique. For example, for Case#2 it has the following calculation: I have written the following source code to implement the Marching Square algorithm...
  13. O

    I Spatial interpolation before or after data processing

    Let a set of values at several discrete points in 2D or 3D space be given. These values will be processed by an algorithm. At the end, processed values need not be known at the original locations but at grid points. Therefore, spatial interpolation needs to be applied. Is there a general...
  14. A

    MATLAB Bilinear spline interpolation MATLAB using MESHGRID and SURF

    Hello. So, I must provide a solution for an image processing course I am taking (implemented in MATLAB).The task is as follows: 1. I must provide a MATLAB script that takes in a DISCRETE N x N matrix (Greyscale picture) and does Bilinear spline interpolation on it. This is the spline function...
  15. C

    A Choosing the Right Interpolation Method for Your Data: A Guide for Engineers

    Hello everyone. I have a vector of size 300321*3; the columns are X position, Y position and recorded data; I need to find the interpolation polynomial. I have acess to mathematica, MATLAB and python. I have attempted to use a NonlinearModelFit in mathematica, but I cannot achieve a Rsquared...
  16. maistral

    A Mechanical steps for the natural-neighbor interpolation

    So I have a massive (I mean, 1000-point) three-column 2D data series (z = f(x,y)) and at some point, I need intermediate values. An option that I thought of is to fit the entire data series in a surface, which is somewhat out of the question due to the nature of the experiments I'm working with...
  17. M

    MHB Extrapolation and interpolation in line search optimization

    hi can you tell me these equations: 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 error in MATLAB fmincg.m...
  18. C

    3d interpolation in Python using a mesh grid

    I have four arrays of data xvalues[], yvalues[], zvalues[] and wvalues[] and I want to create, from this data, an interpolated function w = f(x,y,z). Is it easy to do this in python using first a meshgrid and then calling scipy's interpolation? e.g toy set up is something like, where wvalues...
  19. M

    Numerics FEA interpolation order vs element number

    Hi PF! Can someone help me understand the difference between interpolation order (linear, quadratic, etc) vs element number? Like, if we had a 1D beam (for simplicity) what's the difference between using 1 element and a quadratic interpolation vs 2 elements but a linear interpolation? Not...
  20. S

    A Spline interpolation degree question

    Hi, I working on code that does image tracking with missing pixels, but I noticed that higher ordered spline interpolation is unstable. Found through trial and error that the best result is degree 3, picture related. I always thought that spline interpolation does not display behaviours shown...
  21. mertcan

    Consistency of interpolation in terms of flux at node sides

    Hi, first of all I am aware of the fact that QUICK SCHEME used in computational fluid dynamics has consistent slope at the sides of node elements (for instance at the left side of node 3 in my attachment same slopes exist) as you can see in my picture/attachment. But I must express that I can...
  22. C

    Weights and interpolation -- Replicating Python code with hand calculations

    Hello everyone. I have a Python code which calculates, given a continuos uniform random variable U(-1,1), the order of a interpolation polynomial and a set of points the evolution of a function of this random variable. i.e. v0 = cp.Uniform(-1,1) t = np.linspace(0, 10, 10) order=1 . . . plt.plot...
  23. bhobba

    Is Spline Interpolation an FIR Filter

    Hi Guys This question came up in the new supposed big thing in audio called MQA (Master Quality Authenticated). Here is a technical overview and a link to its patent: https://www.soundonsound.com/techniques/mqa-time-domain-accuracy-digital-audio-quality...
  24. PhysicsKid0123

    Help with interpreting an interpolation problem

    Homework Statement I don't know if this is the appropriate place to ask this, but I really do need some help. I am doing a homework problem and I don't understand what is being asked. It goes as follows: > Write a MATLAB function to evaluate the trigonometric interpolant ##p_n(x)## for a given...
  25. M

    I Linearization with Polynomials

    Hi everyone. I started to look at different linearization techniques like: -linear interpolation - spline interpolation - curve fitting... Now Iam wondering (and I guess its very stupid) : As polynomials with a degree > 1 are not linear, why can I use them for linearization? With the...
  26. ElPimiento

    I How is it that the SPH cubic spline kernel in normalized?

    Hi, (This is more of a math question but I thought Astronomy people would be more familiar with the equation and how it's used) So in Monaghan 1992 (http://adsabs.harvard.edu/abs/1992ARA&A..30..543M, bottom of pg 554) a cubic spline in three dimensions is defined. I tried to integrate it (using...
  27. mishima

    I Interpolation of Graphed, Cutoff Sensor Values

    Hi, recently I've been playing with a little CO2 sensor. It is capable of reading ppm (parts per million) of CO2 from near the sensor up to a max of 10,000 ppm. We have a small apparatus for holding various absorbent chemicals, such as lithium hydroxide, and are controlling the release of CO2...
  28. G

    A Methods to interpolate surfaces from gradient field?

    I have a 2D regular grid of vectors representing average headings on a 2D spatial domain. These are generated by stochastic simulation of chemical-sampling and gradient-estimation techniques for a robotic search algorithm seeking a chemical source. Without going into a lot of detail, I would...
  29. J

    I Newton Divided Difference Interpolation Polynomial

    f(x)= a(0) + a1(x-x(0)) + a2(x-x(1))(x-x(0)) I am having a hard time understanding the intuition of (x-x(1))(x-x(0)) being multiplied by the coefficient a(2). For example, if I added a(3) to the equation, I would have had to multiply a(3) by (x-x(0))(x-x(1))(x-x(2)). I've researched the Mean...
  30. M

    Get equation that describes set of measured values

    Hello. A whole decade passed since I graduated mathematics and shifted to other profession, so my knowledge is very rusty. There is an important problem for a scientific work that I need help for. Let's say factor t is being calculated from factors x, y and z, all some parameters from living...
  31. D

    I Analyzing an interpolated function

    Hello, Consider I interpolated some experimental data, and now I have a polynom. Knowing almost for sure that the funcion is not a polynom, but something else like root, trigonometry or combination. What steps do I need to do in order to distinguish the type of the funcion?
  32. S

    Do you know about operational equations?

    Many years ago, I encountered a problem involving four numerical data in a square array or a rectangular array. The standard method for interpolating that design is the bilinear equation. For example, let the array be ACIG as below left. If A=1, C=3, G=7, I=9, then the bilinear equation yields...
  33. T

    I Using interpolation to calculate p-values from t-table?

    Hi there, I've started learning the concept of t-tables and have a question regarding methods to find p-values. I realize that the t-table is limited in providing p-values for every possible t-score. Instead, we must rely on interpolation to attempt to get more precision on the p-value. I've...
  34. N

    I Solve Lagrange Interpolation Problem with Pen Position Detection

    Hi all I am facing a problem and I hope that you can give me a hand. Here I describe the situation I am working on a digitizer that can detect the pen position by measuring the antennae energy that are placed in a grid fashion. To get the x coordinate of the pen I measure the energy of three...
  35. I

    MATLAB Linear Interpolation in MATLAB: Troubleshooting and Tips

    hi! here's my question. here's my code. i have no idea what to do now :( x = 0:9; y = [0.053 1.477 1.970 3.279 4.153 4.934 5.178 5.828 6.082 6.484]; % data X = linspace(0,8.5,1); Y = interp1(x,y,X,'pchip')
  36. R

    X0 value for Newton's forward interpolation formula

    If x values are: 10, 20, 30, 40, 50 corresponding y values are:20, 65, 180, 390, 505 then what is y value at x=25. I was having an argument with maths sir. I was saying to take x0 as 10 to get the answer as 107.14, which is correct application of formula, but our maths sir said that we should...
  37. F

    Python How can I input a polynomial equation of infinite terms in P

    I have been given a task to create an interpolating/extrapolating programme. I have completed the programme for linear interpolation (2 points) but now must make it usable for 3 or more points, ie a polynomial of n points. I think I have the equation in general for a polynomial as it is an...
  38. B

    Changing format of the equation of interpolation

    Give 2 points: (a, f(a)) and (b, f(b)), is possible plot a line function L(x) that intersects these two points, the linear function is: L(x) = f(b) \frac{(x - a)}{(b-a)} + f(a) \frac{(x-b)}{(a-b)} In other format, is: L(x)-f(a) = \frac{f(b)-f(a)}{(b-a)} (x-a) Now, given 3 points: (a, f(a))...
  39. G

    Langrange interpolation polynomial and Euclidian division

    Homework Statement Let ##x_1,...,x_n## be distinct real numbers, and ## P = \prod_{i=1}^n(X-x_i)##. If for ##i=1...n ##, ##L_i = \frac{\prod_{j \neq i}^n(X-x_j)}{\prod_{j\neq i}(x_i-x_j)}##, show that for any polynomial A (single variable and real coefs), the rest of the euclidian division of A...
  40. H

    Hermite Interpolation extended to second derivative

    SOLVED 1. Homework Statement Find polynomial of least degree satisfying: p(1)=-1, p'(1)=2, p''(1)=0, p(2)=1, p'(2)=-2 Homework Equations In general, a Hermite Polynomial is defined by the following: ∑[f(xi)*hi(x)+f'(xi)*h2i(x)] where: hi(xj)=1 if i=j and 0 otherwise. Similarly with h'2...
  41. G

    High Frequency signal with fast risetime, its bandwidth

    Hi, I am new to world of electronics and to high frequency Domain. But I am working on a design where I have a coax of 30cm length. I have used an external oscillator to generate 7GHz fast falling pulse. I am using a Controller to control the oscillator. Now I have a pulse of about 350ns...
  42. M

    Interpolation and linear algebra

    Homework Statement As a string in my program. Homework Equations Solving a system with the forward phase of row echelon reduction and a consecutive back substitution. All done by numpy here. (The book suggested MATLAB, etc). The Attempt at a Solution import numpy """ In a wind tunnel...
  43. A

    MATLAB [Matlab] Which is the good solution My vs. School - curve fitting?

    Hy, I wonder which is the good solution for this problem: Nonlinear least square problem: function: y = x / (a + b.x) linearization: 1/y = a/x + b substitution: v = 1/y , u = 1/x >> model v = b + a.u What we did in school: x = [1 2 4 7]; y = [2 1 0.4 0.1]; v=1./y; u=1./x; n = length(x)...
  44. Mogarrr

    Justifying Linear Interpolation in Coin Toss Example

    Today in class, there was an example where I didn't understand certain justifications. The example goes something like this: A casino runs a game of chance where you toss a coin and they pay $1 if you get heads , and you pay $1 if you get tails. The coin is a fair coin. A gambler starts...
  45. Jay1

    MHB A PHP Function To Perform Nth-Order Lagrange Interpolation

    The following Lagrange interpolation function is extremely useful. It can be used in just about any branch of science. I use it extensively in astronomical computations for such things as finding the dates and times of the seasons over thousands of years and phases of the moon at any given...
  46. gfd43tg

    Cubic interpolation with matrix

    Hello, I am trying to understand the slides in the PDF I posted. I am looking particularly at slides 20-24. I am so confused how the matrices are set up with two separate coefficient conditions. The context of these slides is that we are learning how to interpolate with cubic splines. What...
  47. J

    Can polynomial functions be determined in 3D using given points and coordinates?

    If given three points ##P_0 = (x_0, y_0)##, ##P_1 = (x_1, y_1)## and ##P_2 = (x_2, y_2)##, the polynomial function ##f(x)## that intersect those points is ##f(x) = a_2 x^2 + a_1 x^1 + a_0 x^0##. where: ## \begin{bmatrix} a_0\\ a_1\\ a_2\\ \end{bmatrix} = \begin{bmatrix} x_0^0 &...
  48. J

    Interpolation with 2 variables

    If given three points ##P_0 = (x_0, y_0)##, ##P_1 = (x_1, y_1)## and ##P_2 = (x_2, y_2)##, the polynomial function ##f(x)## that intersect those points is ##f(x) = a_2 x^2 + a_1 x^1 + a_0 x^0##. where: ## \begin{bmatrix} a_0\\ a_1\\ a_2\\ \end{bmatrix} = \begin{bmatrix} x_0^0 & x_1^0 & x_2^0...
  49. D

    Trigonometric interpolation of a sampled signal

    Given N sampled points, using the FFT we can get the Fourier transform of those N points Xk. With N/2 the Nyquist frequency and X0 the DC value. Using the inverse we can then get back the original function we just measured. However if we would like more points then just the N we have measured...
  50. A

    Using Linear Interpolation to Find Interest

    Homework Statement Homework Equations The Attempt at a Solution I understand how they calculated NPW but how did they use the linear interpolation method?
Back
Top