# Questions tagged [interpolation]

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

930 questions
Filter by
Sorted by
Tagged with
38 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. ...
• 11
81 views

### Understanding Interpolation with Cubic Splines

My ultimate question: given data, what function is Interpolation with Method->"Spline" creating? I recall from my ...
• 1,685
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 ...
57 views

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

I am not able to solve this integral ...
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 ...
168 views

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

Is it possible to call a defined function inside Mathematica like InterpolationFunction[...] from Matlab? Thanks!
• 36.3k
1 vote
82 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: ...
• 981
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 ...
• 23
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 ...
• 403
16 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}. ...
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 ...
• 51
1 vote
51 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 ...
• 11
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 ...
• 727
35 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
137 views

### Fast integration of ElementMeshInterpolation[]-functions

In this simplified example I consider a small FEM-mesh ...
• 36.3k
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 ...
• 188
1 vote
122 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 ...
• 181
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 ...
• 153
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: ...
• 51.3k
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 ...
• 2,977
58 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-...
• 618
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 ...
• 203
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 ...
• 43
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 ...
• 3,586
105 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) ...
• 51
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 ...
• 1
103 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? ...
• 332
75 views

...
• 279
76 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 ...
• 1,055
66 views

### How to make integrals of interpolated matrices constructed by other interpolated quantities?

I have the following code producing an interpolated unitary matrix: ...
• 55
122 views

### How can I sort a data in specific form for Interpolation?

I have data of closed shape form ListPlot[data, AspectRatio -> 1] I would like to Interpolate this data to get the missing points so I am using ...
• 2,977
71 views

### Change the definition of an interpolated function

I have a little question. I used the built in function 'NDEigensystem' to solve a differential equation; the results of this operation give me several functions; so I type in imput one of this like: <...
1 vote
88 views

### Trying to implement Newton's interpolation polynomial - not evaluating divided differences

I'm trying to find Newton's interpolation polynomial for a given function and a set of points. However, I'm having some issues with finding the divided differences (in this case I've notated them with ...
65 views

### Avoid Extrapolation When Using NMaximize on Interpolating Functions

I want to use NMaximize to find the maximum value given by one interpolation function with respect to a constraint given by a second interpolation function. The main problem is that NMaximize produces ...
1 vote
65 views

### Numerical integration in one variable, of a multivariable interpolation function

I create the following set of data: newmatrix = Flatten[Table[{t, v, new[t, v]}, {t, 0, 2 Pi, Pi/4}, {v, 0, 1, 0.01}], 1] where ...
1 vote
33 views

### Interpolation of a set of points that include a non-numeric real constants

I have a set of data like: matrix=Table[{x,y,x+y*c1},{x,0,1,0.1},{y,0,1,0.1}] where 'c1' is a real constant. I'm trying to create an interpolation function called '...
65 views

### Constrained Optimization with Interpolating Functions

My goal is to use a gradient descent type method to maximize interpolating function1 with respect to the constraint that interpolating function2 <= 0.5. I am working with 4D data (please see below)....
1 vote
75 views

### Working around Error: Interpolation on unstructured grids using Sort for 4D data

I'm having trouble with interpolation and I think it may be due to how my data set is sorted. I'm getting the error "Interpolation::udeg: Interpolation on unstructured grids is currently only ...
96 views

### Getting error "Input value lies outside the range of data in the interpolating function." even though values are in domain

I'm using Interpolate on some 4D data that I have. After I interpolate it I get output saying Domain:{{4,8},{0.5,7},{0.7,2}} Output:Scalar However, when I try to plug in a single point for ...
1 vote
85 views

### Getting Explicit Function Definition from Interpolate and Visualizing Data

I am doing 3D interpolation and I would like to get the function definition as output so that I can use it in gradient descent method optimization. My data set is of the form ...
1 vote
103 views

### Revolve 2D set of points and calculate volume

I have a set of points, defining some 2D object (a cross-section). Here is an example: points={{0, 0}, {14, 0}, {14.5, 1}, {15, 2}, {0, 16}} To visualize the ...
• 888
139 views

### How to substitute a random function into a solution of a differential equation?

I would like to solve a differential equation including a source term. The source term is a random variable and I model this by creating a list of RandomReal and ...
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: ...
1 vote
49 views

### Interpolate function against time

I have two vectors called lammdaWind11 and timeWind11. They are of size 51*1. I have interpolted each one independently as ...
• 115
35 views

### Piecewise[ ] for joining InterpolationFunction objects?

I want to combine InterpolationFunction objects, results of an NDSolve in a loop, into one function. This is my code: ...
1 vote
36 views

### Replace expression with part of InterpolatingFunction

I have an InterpolatingFunction which returns a 4 dimensional List as output. Let's call it f...
• 1,259
64 views

### Analyzing anomalies of Bluetooth audio generation with Mathematica

I' m working on an audio generator for physics lab, using an Android device and Bluetooth . However, the response of the Bluetooth speaker is wrong. When programmed to deliver, say 3150 Hz, it may ...
• 121
97 views

### Can I get an x-value for a given y-value using an interpolation function? [duplicate]

I'm brand new to Mathematica and struggling figure this all out. I made an interpolating function with the following (year, population) data. I'm trying to figure out what year the population reached ...
• 21
1 vote
257 views

### FEM 1D 3D region coupling - speed up coupling using boundary integration

I am working on a simulation of the heat equation involving a 3D solid simulation coupled to a 1D fluid simulation (convective term of heat equation). I am using the method of false transient as ...
• 563
1 vote