# Questions tagged [interpolation]

Questions on the interpolation functions in Mathematica (InterpolatingFunction[], Interpolation[], ListInterpolation[], FunctionInterpolation[], InterpolatingPolynomial[], etc.)

873 questions
Filter by
Sorted by
Tagged with
24 views

### Variable order in InterpolatingFunction

I'm attempting to deal with a interpolating a function $f[x,t]$ on an unevenly spaced grid of $n$ points. My x-variable is continuous, so there's no difficulty in fitting a cubic spline to it with ...
84 views

### Periodic extrapolation out of the domain of the solution of a PDE in two directions

As a prototypic problem ...
56 views

### Derivation of Interpolation function

I have a problem to derive an interpolation function. I am quite new to mathematica, so I suspect I miss something. I have a list of values of 1000 values (L) that represents a function that I want to ...
91 views

### Making function from data by using interpolation

I Have two set of data separately, which one of them is pressure and the other one is energy density.(P: pressure, E: energy density) I want to use these data as a function, P(E) or E(P) by using ...
181 views

### Using NIntegrate with interpolating function

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. This is actually inline with a previous question I had asked about a week ...
34 views

### Integrating a Interpolation function with domain {0,1} and output dimension >1: I don't understand this behavior--can anyone help me out?

My goal is to integrate the last dimension of the output of an Interpolation function. I am getting behavior that I don't understand (note to readers, I've pasted all the code without comments at the ...
196 views

### Interpolation of points in 3D with smooth space curve

In Mathematica we have ListSurfacePlot3D for reconstructing surface from list of points in 3D. But I can not find something similar if I want to reconstruct a curve ...
46 views

### Get discrete data points from ListLinePlot or Interpolation

If I have the following data: ...
65 views

### Using Reduce with a Interpolation function

I am trying to find all the solutions of an equation that contains an interpolation function int, where int=Interpolation[data] (...
67 views

### Numerical integration of a function with several variables

I need to calculate the next integral $$F_l(R)=\int_0^{\infty} {dk k^2j_l(k R)*2*\exp[-0.36k^2](k)\rho_l(k)(18/k^2)P_l(\cos{\beta})}$$ where ρl(k) is given by  \rho_l(k)=\int_{0}^{\infty}{dr r^2 ...
63 views

### Numerical Definite Integral of Numerical Laplace Transform

I'm having problem taking the numerical definite integral of a numerical Laplace transform that depends on two variables due to NIntegrate:inumr errors: ...
89 views

### Numerical Laplace Transform of InterpolatingFunction

What are some ways to find the numerical Laplace transform of an InterpolatingFunction? (I know that numerical Laplace transforms are rarely used but my application requires a numerical evaluation). ...
78 views

### Using/ Extracting data from Interpolating Functions returned from NDEigensystem

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. I am able to get the accurate energy eigenvalues but am having problems with ...
92 views

### Semi-periodic Interpolation

I have a set of data, e.g. damped waves in a finite box of size L, so that the data is periodic in space but not time. At a particular instant in time, i.e. taking a cross section of ...
89 views

### Problem solving a function using FindRoot and then plotting it

When I run the following code: ...
33 views

### find the planar curve that passes two given points, whose tangent directions at these two points are also given

This is related to drawing the links and joints of a robot manipulator. I'd like to find a way to generate a link bwtween two given bars (joints), and the said link has to be normal to the two bars ...
285 views

### Unexpected 'switch' of partial derivatives when differentiating InterpolatingFunction

Bug introduced in 11.3 or earlier and persisting through 12.1.0 or later - Fixed in Version: 12.1.1 In short, there is a simple initial boundary-value problem for which NDSolveValue produces an ...
207 views

### Is it possible to fit such a large range plot in mathematica?

I am trying to solve the coupled differential equation numerically with Mathematica. But the range of values are large so mathematica cannot give correct plot. Here is the code: ...
49 views

### Axial Symmetric 2D Cylindrical Field to Cartesian 3D Field

Previously, I've used 2-dimensioned [radius, zeta] output from NDSolve ({InterpolatingFunction, InterpolatingFunction}] and used the FieldTransform to convert the axial-symmetric cylindrical slice to ...
386 views

### How can I resample a list of {x,y} data for evenly spaced points?

I have generated a list of {x,y} points using a position function of a particle moving in 2D space. If you run the following code you'll see a small bit of the particle's motion (I cut out most of it ...
151 views

### How to represent flux in a shape

I used Tim Laska's solution here for raytracing, and modelled 10000 photons impinging onto a cone. ...
47 views

### lookup table data with interpolation from reference list

I have data as: ...
757 views

### Finding a third degree polynomial that passes through given points

If I have three points xi-1,xi, xi+1 where y(xi) =1 and y(xi-1)=0, y(xi+1)=0 (basis function) and I need to define a line that passes through these points I will use the line equation y-y1=(y2-y1) /(...
383 views

### Rescaling data to make a “continuous” function

I have acquired many sets of data, which all represent a single function, but which are randomly rescaled by a constant (due to the measurement specifics). I'm looking to effectively stitch them ...
422 views

### Adding Regularisation to Built-in Interpolation function

tl;tr; How to improve performance of regularised Interpolation? Context Since Version 12, Mathematica now incorporates a range of (underrated IMHO) ...
2k views

### Approximately Fit Data Without FindFit

I have some noisy data, and I'd like to analyze the derivative of the function the data approximately matches. Interpolation is normally great, but doesn't work ...
51 views

### Cannot understand meaning of “identical”

This came up in the context of plotting solutions to NDSolve, but I've reduced it to the following issue. This really has me scratching my head. ...
248 views

### How to fit spline through points in $\mathbb{R}^3$?

I have coordinates of points that represent a curve (for example, helix or centerline of moebius strip) in $\mathbb{R^3}$. I want to fit a Bspline through these points. How to do this in Mathematica? ...
46 views

### Extrapolation Handler and NIntegrate: Bug?

I have an list of data which I interpolate such that it returns the value 0 in case I give it values outside of its domain: ...
48 views

### Evaluating Interpolating functions from NDSolve to solve for a specific time, and evaluating the functions at that time

For one of my homework assignments in a mathematical modeling class, we were supposed to take a 2d system of second order differential equations, and convert it to a 4d first order system of ...
92 views

### How to make interpolation for data of closed shape?

I have a data that describes a closed shape, let here assume it is a circle ...
115 views

### Adding an interpolated function to neural networks through ElementwiseLayer

1.Trying to add an interpolated function to neural networks. ...
53 views

### Interpolated Hyperbolic tangent as a layer of a neural network

It is necessary to specify piecewise linear interpolation of the hyperbolic tangent. And substitute this function as a layer of a neural network. I tried a lot of things, please suggest your options.) ...
50 views

### How do I combine InterpolatingPolynomial and Integrate?

I want to find a real-valued polynomial (or trig) function f[x] that yields 0 at x=-a, and ...
23 views

### Interpolate and integrate data with error messages

If I have the following code, where cp74[j] represents a very long list (e.g. {{a,b}{c,d},{e,f},{g,h},...} for different j values. ...
164 views

### Lagrange Interpolation [duplicate]

I have the following table with 90 elements, and I want to write a loop that gives me the Lagrange operators. I want to construct an interpolation with Lagrange interpolation and show the loop to ...
48 views

### Multivariate polynomial data fitting formula

A short description： consider $f(x,y,z)=x^2+y^2-z^2$ we can know that $f(1,0,1)=0,f(0,1,1)=0$ ,etc. so we can get the roots of this polynomial. Now if given the roots of polynomial, how to solve ...
184 views

### Find a continuous map between two sets of 2D points

Given two sets of points in 2D points1 and points2 inside a rectangle, I would like to find a continuous map ...
51 views

### Why doesn't Sort work in this case ? (Only numerical values)

Context I want to interpolate a complicated symmetric function f of 2 variables x and y defined by some numerical integral involving Bessel functions. Since computing the integral itself is a bit ...
44 views

### How do I prevent the Interpolation function from giving negative values?

I've got an interpolation function: ...
59 views

### Elegant solving and plotting of multivalued solutions for a system of 2 equations with parameters using NSolve?

This looks long and complicated, but it's really not. I just tried to pose the problem well. I have to solve a relatively complicated system of equations that has 2 variables and 3 parameters. I ...
63 views

### Creating an interpolation matrix efficiently

I would like to know if there is a fast way to create the following matrix (note that the matrix is defined with arbitrary precision): ...
65 views

### Numerical integration of an interpolating function with another analytic function [closed]

I have to numerically integrate over $x$ a complicated function that has this structure $f(x,y)g(x)$ with a parameter $y$. In my case the fastest way to deal with it is generate an interpolating ...
74 views

### I am having trouble with the Show[] section of this code

Question: I am unsure how to graph the interpolated graph with the regular graph on the interval $[1,4]$. Not even the Show line works about even if I'm pretty sure ...
73 views

### How to solve an algebraic equation with InterpolatingFunction?

How to solve the equation f[t]==0 for the function f[t] defined by differential equation,i.e. if ...
48 views

### Is it possible to obtain the algebraic expression of an InterpolatingFunction? [duplicate]

Up until now, I have been trying to obtain an expression for an InterpolatingFunction obtained from NDSolve, by using the ...
39 views

### Replacing sublists with criterion or Interpolation for a smooth curve

Supposing we have the following list (very small, can be copied into a notebook directly) ...
2k views

### 2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...