Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
1
vote
4answers
79 views

multi-dimensional interpolating function evaluation and extract dimension

I have an interpolating function which output dimension is greater than 1, so it's a vector. I get it as the result of a NDSolveValue. The problem is that I'm not able to Evaluate it. I would obtain ...
1
vote
2answers
90 views

Taking a diagonal cut through a matrix

Lets say I have a gaussian data matrix, e.g. x=GaussianMatrix[20] I would like to take a cut through this matrix at a 45 degree angle to get its intensity profile, ...
1
vote
0answers
38 views

Integrating and seeing an interpolating function

I have the following piece of a Mathematica notebook: As I understand, the interpolating function M1hatInterp is piecewise polynomial and hence can be integrated ...
2
votes
1answer
76 views

Does mathematica cache the interpolating function from ParametricNDSolve?

I want to evaluate the solution of a system of non-linear ODEs using ParametricNDSolve. The output of ParametricNDSolve is a ParametricFunction object. Let's call it $f_\theta(t)$, where $\theta$ is a ...
0
votes
0answers
68 views

How to fit an interference pattern with Interpolation and FindFit?

I have two sets of experimental data. LightSourceSpectrum2.txt InterferencePattern2.txt The first one is the light source spectrum data, which can become a function of f[ν] using Interpolation. (Note ...
4
votes
1answer
117 views

Reverse engineer visualizations to compactly extract underlying data

TL;DR How to implement in mathematica a tool such as WebPlotDigitizer by Ankit Rohatgi which would allow us to trace automatically curves from either (randomly ordered) data or imported images. ...
4
votes
2answers
144 views

Connecting simple lines from (large) unsorted list of points

Context We are trying to predict the formation of discs of intermediate mass black hole orbiting super massive black holes in galactic centres. This involves finding calorific curves in energy and ...
1
vote
1answer
49 views

NIntegrate not evaluating. "Interpolating Function" [closed]

I am trying to numerically evaluate an integral. I have a function to be integrated, ftbI[s,a] with undetermined variable(s) a. ...
6
votes
1answer
122 views

Defining mesh size for NDSolve

I want to see the effect of mesh size on the solution curves while simulating convection-diffusion - point sink via NDSolve FEM. In the following code (ref also related to this post): I'd like to know ...
0
votes
1answer
115 views

plot multiple curves : solution obtained from NDSolve

I want to plot the solution obtained from NDSolve as a multicurve plot like shown in the following sample image (image ref). Here, x1, x2 , x3, x4 .. are the solution computed at ...
0
votes
1answer
82 views

How to ParametricPlot an InterpolatingFunction

Hi I can Plot the result of an NDSolve (toy example), but I cannot ParametricPlot it. ...
0
votes
0answers
34 views

Nintegrate of a list of numbers

I have an issue. I have a function in two variables obteined from the table of a numerical integral (done with Nintegrate). Now I have to compute another integral (Nintegral) over it so I will have a ...
0
votes
1answer
26 views

Obtaining interpolating functions from NDSolve with two functions

In Mathematica's documentation on interpolating functions, they give an example of how to obtain an interpolating function as a solution of NDSolve, ...
0
votes
1answer
39 views

How to interpolate on log-log scales? I.e., How do I create an interpolation function which interpolates Log[x] vs Log[y]?

I would like to build and interpolation function that takes in x & y data points and interpolates between them logarithmically in both x and y. I see that this a reply on this post (Interpolate on ...
0
votes
3answers
85 views

Find order of polynomial approximation and LeastSquares for given datapoints

I have a set of data, where I'd like to find the order of the polynomial that approximates the data, and also know what the Least squares is. My data: ...
0
votes
1answer
71 views

Possible Bug in InverseFunction

MMA 12.1 For quite some time I have been chasing a bug that I could trace down to the following code. As it is not impossible to fool oneself, I would be glad if somebody could verify this before I ...
1
vote
3answers
151 views

Interpolating and plotting 3D data

I am having trouble interpolating and plotting a set of 3D data. As it appears I have an unstructured grid, tried Interpolation[data, InterpolationOrder->1] but ...
0
votes
1answer
70 views

My plotting comes out to be gray not coloured using AbsArgPlot function in Mathematica. What is the reason for not getting a coloured graph??h

My graph comes out to be gray, not coloured using AbsArgPlot function in Mathematica. What is the reason for not getting a coloured graph or what I can deduce from ...
2
votes
1answer
83 views

How to find the integrand by fitting data - spectrum reconstruction

Problem statement I have some experimental data of measurement values vs. temperature. Now, I want to find the spectrum which causes the measured temperature dependence. The measurement values are the ...
-1
votes
1answer
61 views

How can I get this type of interpolation [closed]

As shown in the figure, it should be a specific value
2
votes
0answers
33 views

Is it possible to modify options inside an InterpolationFunction object?

When dealing with a slow function (e.g., a numerical integration) it is sometimes useful to tabulate it and create an interpolation function to work with instead. I found that one can deal with a ...
0
votes
1answer
101 views

ListContourPlot Interpolation Order

I am trying the use ListContourPlot with interpolation of the measured data to get smooth contour lines. I tried the methods in Data interpolation and ListContourPlot but they work only for some data. ...
0
votes
1answer
35 views

Using NSolve with an interporlated function

I have defined the interpolation function below ...
6
votes
1answer
162 views

What does it mean by order -1 of InterpolatingFunction?

Bug introduced in 12.1 or earlier, fixed in 12.2. In the above code, the InterpolatingFunction object has order -1. In the documentation https://reference.wolfram.com/language/ref/InterpolationOrder....
3
votes
0answers
31 views

Numerically solve a non-differential equation with InterpolatingFunction as output

I have some a function that I need to solve numerically over an entire domain (Ideally I would like an InterpolatingFunction object as output), which does not include any derivatives. I have found a ...
0
votes
1answer
54 views

Manipulating lists based on conditionals and 3D plotting the smooth surface that bounds a list of points

First of all I want to create a list of evenly spaceed points in a cubic region in $\mathbb{R}^3$. Then I want to keep the points in this list which satisfy a certain condition, i.e. a function that ...
0
votes
0answers
51 views

ParallelTable of NIntegrate of an Interpolating Function

I construct a 2D interpolating function using the following data (MWE): ...
1
vote
0answers
34 views

Why ListInterpolation does not allow InterpolationOrder greater than 2 in the "y" direction?

The order is always reduced to 2 in the "y" direction; I would want a better approximation to my data. Independent of the method (spline or hermite), I can choose any order for the "x&...
4
votes
1answer
70 views

Plotting an InterpolatingFunction outside its domain doesn't raise error messages

Let's make an InterpolatingFunction: if = Interpolation[Transpose[{#, Sin@#} &@Range[0, 4, 0.1]]]; As expected, evaluating ...
1
vote
1answer
47 views

3D interpolation providing derivatives

I am trying to interpolate 3D data by also providing the 1st order derivaives in all directions, i.e., besides (x,y,z,f), I also have df/dx, df/dy and df/dz. According to the documentation I should do ...
1
vote
2answers
85 views

Finding the arc length of a region defined implicitly with an interpolated function

I begin by defining an interpolation of some data I have stored at this link for brevity. The interpolating function is a function of two variables, x and ...
1
vote
1answer
63 views

What is the meaning/significance/importance of 'order of interpolation' used in Mathematica? [closed]

You can find details here - https://reference.wolfram.com/language/ref/InterpolationOrder.html.
7
votes
2answers
146 views

PeriodicInterpolation does not work in ElementMeshInterpolation

I want to use ElementMeshInterpolation to generate interpolation function with periodic boundary condition. I use below data as an example ...
0
votes
1answer
77 views
1
vote
1answer
71 views

Convert list of InterpolatingFunctions to data [closed]

If I have g which is a list of Interpolation functions such (I cannot copy the interpolation functions for some reason): g= How ...
0
votes
0answers
74 views

An issue with ParallelTable

Consider a function function[x_,y_,method_,distr_]:=NIntegrate[distr[x,y,z,t],{z,zmin[x,y],zmax[x,y]},{t,tmin[z,x,y],tmax[z,x,y]},Method->method] Here, ...
3
votes
3answers
208 views

How can I interpolate time-series data?

I fetch financial data like this: data = FinancialData["SBUX", "Close", {{2013, 1, 1}, {2013, 8, 1}, "Week"}, "Value"]; ...
2
votes
2answers
114 views

Efficient sinc interpolation of a list

I'm looking for an efficient way to construct a sinc interpolation i.e. an interpolating function of a list of numbers in the form of a Fourier series with a chosen maximum frequency. The input list ...
0
votes
0answers
35 views

InterpolatingPolynomial: magnitude of coeffictions

I have a list of the type {{x,y},f} and want to get an InterpolatingPolynomial for that list. The x values all run between 1.3 and 2, the y values between 0 and 1. ...
0
votes
0answers
52 views

ListLinePlot's Interpolation method

I Interpolated some oscillating data points using ListLinePlot[] , and set the InterpolatingOrder->10 . This gives a nice ...
1
vote
4answers
133 views

How to integrate the interpolated data over the region in which it is non-zero?

Consider some toy-function which I then interpolate: ...
5
votes
1answer
117 views

Derivative of a 3D Interpolated function

I cannot get the partial derivative of a set of data. I managed to get the accurate interpolation, but I cannot evaluate its derivatives. Here are my details: ...
3
votes
1answer
87 views

InverseFunction and Plot them

I'm trying plot an inverse function ...
2
votes
2answers
201 views

Detrending or removing linear trend from 2D data

I have some data that when plotted I get an inclined graph, as described: ...
1
vote
0answers
49 views

Interpolation for different Parameters

I am rather new to Mathematica and I tried to find a solution for my Problem on my own, also looking through this site and the suggested Similar Questions, but I at least could not make out that my ...
0
votes
2answers
115 views

Solve an interpolating function [duplicate]

I have been working with interpolating functions recently and have two functions as a result of an interpolation of two co-ordinate lists. The code I used: ...
3
votes
4answers
403 views

Nested optimization problem - Function approximation

I need to maximize the following function (the input to NMaximize below) ...
2
votes
1answer
87 views

Lagrange polynomials

I need to plot the 9 Lagrange polynomials associated to the points {−4, −3, −2, −1, 0, 1, 2, 3, 4} all on the same axis. So my attempt: ` ...
4
votes
1answer
117 views

ElementMeshInterpolation on a BoundaryMesh

It appears as though ElementMeshInterpolation does not play nice with the element meshes produced by BoundaryMesh ...
0
votes
1answer
33 views

problem in Interpolation

I made a force diagram into a matrix. How can I have find a value in y for a number in x? I know for 0.1 for example the force becomes 500, or for 0.3 it becomes -500 How do I know how much it will be ...

1
2 3 4 5
18