Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
166 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: ...
0
votes
0answers
38 views

Interpolation,graph

I need to make a program in which for a function f(x) = e× ×(2x-7) / ( 3x2-4x+11) and values { 0,1,2,3,4,5,6} finds cubic spline interpolaric function for the corresponding values amd draw a graph for ...
0
votes
1answer
44 views

How to make a natural cubic spline of {{x,y}, …} data

Consider data={{0,0},{1,0},{2,0},{3,1},{4,0},{5,0},{6,0}}; f=Interpolation[data,InterpolationOrder->3,Method->"Spline"]; Then the second derivative is ...
1
vote
0answers
40 views

Interpolating a density plot

I am solving a complicated series of equations (involving FindRoot and PolyLog), and finally I get this plot Code here: ...
7
votes
3answers
4k views

Is it possible to compute with the trapezoidal rule by numerical integration?

Is it possible to compute trapezoidal rule numerical integration? I know that Mathematica has Interpolation, and that a list of points can be interpolated and then ...
1
vote
1answer
30 views

How to convert Piecewise function to Interpolation function?

In the following piece of code I am trying to convert a Piecewise function to a simple interpolation function f[t_] ...
2
votes
1answer
119 views

How to interpolate {{xi,yi},… ,{xn,yn}} with minimum bending energy?

Thin Plate Splines are explained here, and a Mathematica implementation of that for real samples { { x1, y2, z1 }, { x2, y2, z2 }, ... , { xn, yn, zn } } is ...
3
votes
1answer
47 views

How can I force an interpolated function to go through a certain point?

Let's take this interpolated function: f = ListInterpolation[{1, 2, 3, 5, 8, 5}] I want to make 1/f'[x] go through a certain ...
1
vote
2answers
63 views

Integral of a Wavelet function

I ran into problems integrating a function which contains both an If condition and a Wavelet which is an ...
26
votes
7answers
6k views

Extracting the function from InterpolatingFunction object

I've used Interpolation[] to generate an InterpolatingFunction object from a list of integers. ...
4
votes
0answers
45 views

How to extract the domain of the definition of the interpolating function? [duplicate]

When calling the interpolated function without specifying the value of the argument, Mathematica displays its domain of the interpolation. How to extract it?
0
votes
0answers
46 views

WhenEvent action won't be applied (+ strange problem?)

I'm building a project about the dynamics of a 9-conf robotic industrial arm. I've come to the point where I have to integrate the solution of differential equations for a couple of movements, but can'...
0
votes
0answers
38 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 ...
3
votes
2answers
80 views

Extracting data from InterpolatingFunction 2D surface plot

I would like to directly extract the surface plot data from the solution to a differential equation (using NDSolve). While there are many examples of this I haven't been able to find an example in 2D. ...
0
votes
1answer
49 views

Interpolation undefined on domain

I have made an interpolation of two variables of a fairly large set of numbers imported from a file (4 million lines in an .m file written out with C++). The ranges of the two parameters is 0 to 2.5 ...
7
votes
1answer
130 views

How to combine NDSolve interpolating functions?

In the following working example ...
0
votes
1answer
63 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 ...
1
vote
1answer
53 views

How to interpolate a set of points with given local extrema?

I have a set of points on the 0xy plane: say (-3,0), (-2,4), (-1,0), (1,2), (3,0), (5,1), (6,0), (8,-2), (10,0) I would like to use software, like Mathematica, ...
2
votes
2answers
74 views

Interpolating a list

Here is a sample list data = {{1, 2.1, 55.2}, {2, 2.7, 60}, {3, 3.1, 65}, {4, 3.5, 67}, {5, 4.5, 72}, {6, 4.2, 77}, {7, 5.9, 80}} which contains three rows. Now,...
5
votes
0answers
47 views

DumpSave and precision of interpolation data

Consider the following prec = 32; x = N[Range[0, 1, 1/10], prec]; f = Interpolation[Transpose@{x, x}]; Then ...
3
votes
3answers
146 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? ...
0
votes
1answer
33 views

finding the correct interpolation accuracy [closed]

Ciao, I need to interpolate this data: ...
0
votes
1answer
55 views

Find Unknown coefficient using Contour plot

I have I really complicated equation, but for simplicity lets assume my function is F(x,y,z)= ax+by+c*z, where a, b and c are some unknown constants. From experiments we know that at: x=3, y=2, z=1 ...
18
votes
3answers
7k views

Creating a 3D List Line Plot From Discrete Points

Given the following Runge-Kutta ODE solver and the graphical output below, how do I get a 3D line plot instead of a 3D point plot? I see that there is no ListLinePlot3D function, so I thought it might ...
0
votes
2answers
73 views

Change Equation E(T,u) and N(T,u) in T(E,N) and u(E,N)

I am pretty new on mathematica and I have three functions, each defined by an analytic expression: ...
1
vote
1answer
38 views

Interpolation of a “bit by bit” Function

I am facing a problem with integrating a function. I have to integrate the function "bit by bit". This is the smallest working example that shows the problem: ...
0
votes
1answer
144 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 values ...
0
votes
1answer
60 views

Integrating a function “bit by bit”

I am trying to integrate a function. But for this task I need to do it "bit by bit". I created a working example that shows the problem. ...
0
votes
1answer
49 views

InterpolatingPolynomial defining x

So InterpolatingPolynomial use integer x values? How do i manipulate them? InterpolatingPolynomial[FUNCTION of x, x] Guess i quite don't get the function definition cause my code is not working ...
0
votes
0answers
25 views

Plot function for interpolation not working? Messed something up [help]

$\left(\begin{array}{ccccc}{1} & {x_{0}} & {x_{0}^{2}} & {\dots} & {x_{0}^{n}} \\ {1} & {x_{1}} & {x_{1}^{2}} & {\dots} & {x_{1}^{n}} \\ {\vdots} & {\vdots} & {\...
7
votes
2answers
130 views

Bug in VectorFieldPlot[] with InterpolatingFunction[]?

Bug introduced in 11.3 or earlier and persisting through 12.0.0 or later While looking at https://mathematica.stackexchange.com/questions/192081/how-do-i-plot-a-divergence, I thought to suggest the ...
0
votes
0answers
41 views

Predicting value outside data set

I have a list with values at some points: ...
2
votes
2answers
48 views

Interpolation to generate elements?

I have a list with values at some points: ...
3
votes
1answer
155 views

Solving partial integro-differential equation

I want to solve a partial integro-differential equation of this form: using NDSolve, something like ...
1
vote
0answers
35 views

how to use interpolating functions to smoothly paint a polygon? [duplicate]

consider 4 different colors on the nodes (with different parameter values) how to interpolate when the color values are given on the nodes using the constructed interpolation functions to paint the ...
1
vote
2answers
186 views

Unstable NIntegrate result vs plot

Here I have a $\Psi$ function with a few arguments: ...
5
votes
1answer
92 views

Eigenvalues and numerical eigenfunctions for similar differential operators

I am looking to numerically approximate the eigenvalues and eigenfunctions for a differential operator I am working with, assuming $\pi$ periodic boundary conditions. Namely, I define the function $...
44
votes
5answers
1k views

How can the behavior of InterpolationOrder->0 be controlled?

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
10
votes
2answers
511 views

Morphing between two functions

Assume we have 2 peaked positive functions f[x_] := Exp[-(x + 3)^2] g[x_] := 1/2 Exp[-(x - 3)^2/4] that look like Would it be possible to numerically find a ...
0
votes
0answers
39 views

Get R^2 value between interpolating functions and a list of points

I am looking to compare the degree of accuracy of a theoretical model by comparing my theoretical curve to my experimental data points. My theoretical curve is an interpolating function generated ...
0
votes
0answers
65 views

How to fit a spline (not interpolate) through points in 3D?

I have coordinates of points in 3D and want to fit a spline through these points. I found a least square approach for 2D case: https://demonstrations.wolfram.com/...
3
votes
3answers
177 views
0
votes
2answers
109 views

Non-linear differential equation with tricky variable dependence

My problem regards solving a differential equation and can be reduced to the problem of finding $f(x)$ such that $\frac{df}{dx}=\frac{dh}{df}$, with $h(f)$ a known function. I have this list of data,...
2
votes
1answer
42 views

Interpolating and subtracting two sets of data

I have a data set "data9k" with x varying from 0 to 365, and another data "data0" set with x varying from 0 to 365. But the x values for both data sets are not same but similar. I want to subtract the ...
25
votes
4answers
6k views

Data interpolation and ListContourPlot

I am fairly new to Mathematica and I have two quick questions on using it for a Hydrology and Hydrogeology class. One is about data interpolation and interpolating without any data defined in an area. ...
6
votes
1answer
146 views

How can I accelerate repeated interpolation of a very large dataset?

I am solving a 4D time-dependent PDE using a discretization method. My query is not about solving this; because I am doing it in the following code. The code is OK and it works fine. My main problem ...
3
votes
0answers
53 views

Extracting part of an Interpolating Function [closed]

I get an InterpolatingFunction, call if F1, as a solution to NDSolveValue. I then need to do further operations on this function. However, I only need to work with a small part of the domain of the ...
1
vote
2answers
51 views

How can I convert a matrix of 3d experimental data into a 3d list which can be interpolated in a f(x,y) function

I have a 3d experimental *.txt data with the form: y1 y2 y3 x1 f(x1,y1) f(x1,y2) f(x1,y3) x2 f(x2,y1) f(x2,y2) f(x2,y3) x3 f(x3,y1) f(x3,y2) f(x3,y3) I need to ...
11
votes
1answer
199 views

Meaning of InterpolationOrder -> All for multidimensional interpolation

What specific method does Interpolation use for unstructured multi-dimensional data when we set InterpolationOrder -> All? ...
4
votes
3answers
133 views

questions about InterpolationOrder

I have a function $C_0(x)=e^{-(x-2.5)^2/2.0}$ which is differentiable to infinite order. I want to approximate the function with Interpolation such that it is smooth until 10th derivative. Here is ...

1 2 3 4 5 15