Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
6 votes
1 answer
66 views

Are derivatives from interpolating functions created by NDSolve using derivatives of the spline or numerics from solving DE

For example given the code: ...
user avatar
  • 697
0 votes
1 answer
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. ...
user avatar
5 votes
1 answer
84 views

Understanding Interpolation with Cubic Splines

My ultimate question: given data, what function is Interpolation with Method->"Spline" creating? I recall from my ...
user avatar
  • 1,685
1 vote
0 answers
63 views

FunctionInterpolation with some datapoints to start with [closed]

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 ...
user avatar
0 votes
0 answers
59 views

I am unable to plot 3D graph of integral function

I am not able to solve this integral ...
user avatar
1 vote
0 answers
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 ...
user avatar
2 votes
0 answers
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!
user avatar
1 vote
1 answer
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: ...
user avatar
0 votes
2 answers
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 ...
user avatar
  • 23
2 votes
2 answers
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 ...
user avatar
  • 403
0 votes
0 answers
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}. ...
user avatar
1 vote
1 answer
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 ...
user avatar
  • 51
1 vote
0 answers
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 ...
user avatar
  • 11
1 vote
0 answers
64 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 ...
user avatar
0 votes
0 answers
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 ...
user avatar
  • 1
6 votes
1 answer
138 views

Fast integration of ElementMeshInterpolation[]-functions

In this simplified example I consider a small FEM-mesh ...
user avatar
1 vote
0 answers
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 ...
user avatar
  • 188
1 vote
0 answers
125 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 ...
user avatar
  • 181
5 votes
2 answers
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 ...
user avatar
9 votes
1 answer
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: ...
user avatar
  • 51.5k
3 votes
3 answers
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 ...
user avatar
0 votes
2 answers
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-...
user avatar
  • 618
3 votes
1 answer
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 ...
user avatar
  • 203
0 votes
0 answers
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 ...
user avatar
  • 43
0 votes
0 answers
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 ...
user avatar
3 votes
2 answers
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) ...
user avatar
  • 51
0 votes
1 answer
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 ...
user avatar
  • 1
3 votes
1 answer
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? ...
user avatar
  • 332
4 votes
1 answer
76 views

NIntegrate over eigenfunctions found using NDEigensystem

...
user avatar
  • 279
2 votes
0 answers
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 ...
user avatar
  • 1,055
0 votes
2 answers
66 views

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

I have the following code producing an interpolated unitary matrix: ...
user avatar
  • 55
5 votes
2 answers
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 ...
user avatar
2 votes
1 answer
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: <...
user avatar
1 vote
1 answer
91 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 ...
user avatar
4 votes
1 answer
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 ...
user avatar
1 vote
1 answer
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 ...
user avatar
1 vote
1 answer
35 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 '...
user avatar
2 votes
1 answer
66 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)....
user avatar
1 vote
1 answer
77 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 ...
user avatar
0 votes
0 answers
100 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 ...
user avatar
1 vote
2 answers
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 ...
user avatar
1 vote
2 answers
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 ...
user avatar
  • 888
3 votes
1 answer
140 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 ...
user avatar
2 votes
1 answer
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: ...
user avatar
1 vote
1 answer
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 ...
user avatar
0 votes
0 answers
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: ...
user avatar
1 vote
1 answer
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...
user avatar
  • 1,259
2 votes
0 answers
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 ...
user avatar
2 votes
1 answer
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 ...
user avatar
  • 21
1 vote
2 answers
258 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 ...
user avatar
  • 563

1
2 3 4 5
19