# Questions tagged [interpolation]

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

930 questions
Filter by
Sorted by
Tagged with
72 views

### How to approximate a function using B-spline interpolation?

I would like to approximate a simple function of y = sin(x) using 3rd degree B-spline interpolation. The formula is: where D_j are the unknown real coefficients and B_(n,j) are the basis functions. ...
84 views

### Understanding Interpolation with Cubic Splines

My ultimate question: given data, what function is Interpolation with Method->"Spline" creating? I recall from my ...
1 vote
62 views

Motivation: I am using FunctionInterpolation[COMSOL[x]] in combination with COMSOL to search for the interpolation of my COMSOL model. COMSOL needs a lot of time to ...
106 views

### How to do Interpolation to this function after given b this values

χ[b_] := (Z/k)*NIntegrate[Subscript[f, pp1][q]*Subscript[F, pp1][q]*BesselJ[0, q*b]*q, {q, 0, b}]; bList = Table[b, {b, 0, 5.1 , 0.05}] where: ...
58 views

### I am unable to plot 3D graph of integral function

I am not able to solve this integral ...
170 views

### Call function defined in Mathematica from Matlab [closed]

Is it possible to call a defined function inside Mathematica like InterpolationFunction[...] from Matlab? Thanks!
1 vote
41 views

### Can I make a VectorPlot with a domain defined by an InterpolatingFunction?

I'd like to plot a vector field in a custom domain; I can do this using ImplicitRegion and a straightforward function. However, when I replace the function with an InterpolatingFunction I get a ...
1 vote
83 views

### Difference in interpolated data derivative and analytic function

I am trying to calculate the derivative of interpolated data but it behaves differently from the analytic solution. Detailed code that I have used follows: ...
55 views

### Continuous partial derivative of an interpolated function

I know the values for a function v[x,y] on an irregular grid of (x,y) points. Call the table storing all these points xyvtriples. Because of the irregular grid, the Mathematica function ...
126 views

### Finding the minimal distance of a point from an interpolated function

I have an interpolating parametric function (solution of a set of differential equations) and I have an external point. I would like to find the minimal distance between this point and the ...
396 views

### What is wrong with this code? (Usage of FunctionInterpolation and how to make code efficient)

I am trying to create an interpolation out of a function that comes from an improper integral. The end goal is to make a 3d plot over a specific region. Specifically, I have the following code: ...
1k views

### Unexpected view of the Comsol result when I postprocess it in Mma

I simulated some nonlinear PDE using Comsol. Here one can find the results u=u(x,y) in the form of an Excel table with the terms ...
263 views

### Basic 3D Interpolation Failing

I've seen a few other posts asking about the "unstructured grid" error in Interpolation. Here's a minimal (non)working example of the issue: ...
427 views

### Evaluate InterpolatingFunction of two variables on a 2D grid

I am using NDSolve to solve a system of pde's over a 2D domain: 2 equations and 2 unknowns which I call 'u' and 'v'. NDSolve returns an InterpolatingFunction for both 'u' and for 'v' and these are ...
245 views

### Reduce the dimension of InterpolatingFunction

So I have been trying to extract 2D interpolating function(x,t) or (y,t) from 3D interpolating function(x,y,t) by replacing y=0 or x=0. My domain is triangular(see below). Ultimately, I want to ...
231 views

### Multi-variable FunctionInterpolation with the range of one variable as a function of another

How can I modify my FunctionInterpolation code so that the boundary of one of the variables is a function of another variable? ...
207 views

### How to interpolate between InterpolatingFunction objects

For some reasons I need to implement the method of lines instead of using the NDSolve function directly. As described in this tutorial, this is how the simplest PDE can be solved: ...
277 views

### Mesh quality error with interpolation of table

I am trying to interpolate a table of the following form. {{x1,y1,z1},{x2,y2,z2}...} Where z depends on x and y, and x ranges from 0.01 to 1 in steps of 0.01, ...
1 vote
58 views

### Interpolation Function is not saved in notebook

I get the following message when an interpolation function is generated as a solution of NDSolve: I don't know why this warning is showing and I don't find anywhere where I can consult what this ...
17 views

### Interpolating function error: stack trace value and notebook give different values for the out of bound inputs

So, I get the input out of bound error, in the notebook out put. ""Input value {3.,1.5708,3.14159} lies outside the range of data in the interpolating function." Values {3,Pi/2,Pi}. ...
214 views

### How to get derivative of 2D data that is randomly stored in x and y?

I have 2d data in the form {x,y,f(x,y)} which is randomly stored. the random {x,y} for specific shape (square for ...
1 vote
102 views

### Integrate over one variable of a 2D interpolating function returned from NDEigensystem

I'm trying to implement the answer for "Integrate only one variable of a 2D interpolating function" (https://mathematica.stackexchange.com/a/161962/73672) but for interpolating functions ...
421 views

### Interpolation of non-rectangular data failed

I want to interpolate a type of data which is on a triangular lattice in order to make DensityPlot faster(ListDensityPlot is so slow). However, the interoplation failed with error, no matter setting <...
3k views

### What's inside InterpolatingFunction[{{1., 4.}}, <>]?

I'm curious what's inside the InterpolationFunction object? For example: ...
1 vote
52 views

### Interpolation problems for {X,Y,Z} data

I have some data in the form of {{X,Y},Z} that i want to interpolate for Z. (X takes the values from 0 to 40 and Y from 0 to 50000 and Z is from -10 to +10 and the data I have, have integer values of ...
47 views

### Does Interpolation support multi-dimension input and output?

I have an interpolation problem with both multi-dim input and output. Here is an example of the error: ...
333 views

### How to access the components of a vector-valued interpolating function?

I have a problem in accessing the components of a vector-valued interpolating function. I have the following data: data = {{0, {1, 0}}, {1, {0, 1}}}; with a ...
104 views

### Conjugate of InterpolatingFunction?

From NDSolve, I got this: {{a1 -> InterpolatingFunction[{{0., 40.}}, "<>"]}} What would be a sensible approach to ...
324 views

### Accuracy of Chebyshev Interpolation

I have been looking at how to interpolate a function using Chebyshev polynomials. There are several good posts such as this one by Michael E2 and this one by J. M. There is also an example in the help ...
1 vote
63 views

### Smooth Interpolation Between Curves

I'm interested in finding a way to smoothly interpolated between graphics curves (and possibly shapes as well). My current solution is not very elegant ...
138 views

### Fast integration of ElementMeshInterpolation[]-functions

In this simplified example I consider a small FEM-mesh ...
36 views

### rotation and interpolation of x, y coordinates and displacement data

I have x, y coordinates and displacement values at these points as shown in figure. For instance if I select one point (A), I want to get the coordinates of B, which is rotated 120 degrees and find ...
1 vote
53 views

### Why do the two interpolation behave not the same?

I was trying to give the interpolation of a function $f(x)=1/(1+25x^2)$, then I met the problem below: As I want to see the behavior as the interpolation order became bigger, I set it progressed. And ...
243 views

### Creating a numerical table of values and using an interpolation of them to transform pixels in an image by the ImageTransformation command

I am trying to carry out point "Implementing Map" on this paper Interstellar wormholes however I am using my own equations not those given (only the same method). I have generated a list of ...
1 vote
124 views

### How to evaluate an Integral which has Interpolating functions

I am trying to evaluate an Integral which has products of Interpolating functions inside, using NIntegrate command. It gives a wrong answer. The code that I used for performing this task is given ...
60 views

### Problem with multidimensional interpolation: "Data point {0,0} contains abscissa 0, which is not a real number"

I'm trying to do a multidimensional interpolation. For simplicity, say I have the following array: {{{a,b},c},{{d,e},f},{{g,h},i}} This means that I have a two-...
214 views

### Exporting data from a simply generated interpolating function

The question referenced in the link here has a title that matches my question, but the discussion is very complex and does not seem to address my issue. I have solved a partial differential equation ...
60 views

### Interpolate a discrete vector field based on vectors which are not on a grid

I have a discrete set of vectors (in 2D), which I would like to use to construct an interpolating vector field. The vectors, however, are not located on an integer lattice and so the answer given at ...
184 views

### NIntegrate can't handle InterpolatingFunction produced by FiniteElement properly?

This is a problem comes out in the discussion here and I think it's worth posting a new question for it. Consider the following sample: ...
93 views

### Matrix as the discretization of a function $u$ over a rectangle in 3D, how to integrate fast along the axes

I have a function $u$ from 3D to 1D approximated in a list uu and I want to calculate e.g. $$\int_0^1 x\cdot u(x,y,z)dx$$ or \int_0^1\int_0^1\int_0^1 u(x,y,z)...
51 views

### interpolation with order zero seems to be shifted to the right [duplicate]

I'm trying to set up an InterpolatingFunction, that would be a step function. I have a series of x and ...
35 views

### 2D interpolation after numerical integration

I have a function which is a result of NIntegrate and is a function of two variables. Is it possible to interpolate this function by using the above result form the ...
107 views

### How to get "x" value from a interpolating function?

I measured a parameter over time and get this List: (where fisrt value (x) is time and second the value (y) the vale of the parameter) ...
834 views

### Convert BSplineFunction into two Interpolating Functions

Is there a way to decompose a BSplineFunction output into two functions x[t], y[t] ...
51 views

### SphericalPlot the first two column as theta phi, and the third one as color from a n*3 matrix

I'm very new to Mathematica. I'm trying to spherical plot a sphere from an n-row, 3-column matrix. The radius is a constant, the first and second columns are theta and phi of the points, and the last ...
104 views

### How to use ConvexOptimization on a function constructed from data?

Given the following data points sampled from a convex function, how could I construct a convex function that can be minimized using ConvexOptimization? ...
77 views

### Multi-dimensional interpolation of unstructured array returns unevaluated

Interpolation should work fine on an unstructured array of machine numbers with interpolation order 1. However, when both the arguments and output are multidimensional, it doesn't evaluate. The first ...
76 views

...