Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
64 views

How to find interpolated values in a list?

Consider a list as list = {1, 2, 3, 5, 8, 5}; If I apply interpolation on it, f = ListInterpolation[{1, 2, 3, 5, 8, 5}]; ...
23
votes
4answers
1k views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
9
votes
3answers
2k views

Ηow to create an interpolated CDF from its samples?

I want to use a distribution I have only aggregate statistics on, namely its CDF sampled at certain points. I would like to keep it "nonparametric" (remain noncommittal on the parametric form), but I ...
2
votes
2answers
2k views

Extracting polynomials from a cubic spline function

I have this set of three data points and I want the natural cubic spline functions for them: dat = {{-.0247500, .5}, {.3349375, -.25}, {1.101000, 0}}; I tried: ...
2
votes
2answers
185 views

Create a surface function from several plots

I'm quite new to Mathematica. I've used Matlab in the past but it was a long time ago. I'm working on developing a Dark Room Light meter and need to fit some curves. But, ideally, I need to fit all ...
0
votes
1answer
138 views

Derivative of Interpolation parameters

I am working with interpolation function with some non-numerical arguments. A simplified version of the function I am working with is: ...
0
votes
1answer
69 views

How to interpolate my list of results?

I have the results ...
1
vote
2answers
136 views

How to interpolate my results at discrete steps? [closed]

I have the results ...
1
vote
2answers
94 views
3
votes
0answers
188 views

Reducing a FEM 3D Interpolation Function to a 2D Interpolation Function

I'm trying to solve the heat equation in 3D using FEM and back out a slice in the xz plane. My problem is when I define a function that is a slice in the xz plane it uses the full 3D interpolation ...
0
votes
1answer
189 views

Plotting a 3D FEA solution on the mesh

I have obtained solution to a 3D FEA problem and would like to plot it on the mesh. The geometry has holes in it. For example, if u[x,y,z] is an interpolation function, obtained from a FEA solution, ...
2
votes
1answer
324 views

Building a 2D function by combining 1D functions

I have six 1D continuous functions that I want to use in order to find a 2D function. Each of these 1D functions has to be placed at a unique angle $\phi$ w.r.t the $x$-axis as given in the image ...
0
votes
0answers
431 views

Interpolation function and numerical integration

I've noted that the numerical integration time of an interpolated function depends on the size of its domain. If I create two lists from the same function with the same step size, but one having a ...
1
vote
2answers
717 views

Replacing variable in an equation with an Interpolating function polynomial and plotting residual

I was trying to plot the residual for the solution of my PDE. However, I was unsure about a couple of things. I imported the data and created an Interpolation polynomial with ...
12
votes
1answer
605 views

Custom interpolation on unstructured grid (2D, 3D)

as I'm not satisfied with the way Mathematica interpolates data on unstructured grids, I would like to implement my own interpolation. I will aim for Crouzeix - Raviart type of (quadratic) triangular ...
1
vote
1answer
148 views

Interpolation is not smooth

Consider a function ...
20
votes
2answers
2k views

Higher order periodic interpolation (curve fitting)

I have a list of points in 3D, and I want to get a smooth interpolation or curve fit (it is more for illustration) of these points such that the first and second derivatives at the start and end ...
10
votes
2answers
384 views
0
votes
1answer
32 views

NMaxValue with complex interpolation

I've encountered a very strange problem. I'm trying to find a minimum of a real part (or absolute value, or really any possible real-valued expression) of some complex function, which was previously ...
3
votes
2answers
140 views

Add interpolating functions over an unstructured mesh to get a single interpolating function

In a Newton iterative FEM PDE solver I am writing, each iterative step involves updating the current solution function u by adding to it the increment function <...
0
votes
1answer
53 views

make time function with Interpolation of discrete time data and use this function in Solve and Plot

I have value of a and b in terms of time for discrete value of time. How can i make a time function with interpolation? after that and generate a[t_]:=Interpolation of some point in terms of time... ...
1
vote
1answer
77 views

Interpolation function precision in multi dimentional case

I have this interpolation example ...
1
vote
1answer
187 views

Interpolating the Treasury yield curve

The following code: scrapes current U.S. Treasury yield data from the Treasury's website; plots the available data points (from the 1, 2, 3, 5, 7, 10, 20, and 30 year instruments); and interpolates &...
1
vote
0answers
226 views

Unable to Solve Area Using Paramteric Equations derived from The Numeric Soution of a Differential Equation

I'm creating a test that measures the distribution of closed shape $\mathcal{C}$. This requires taking the average ray length (from $(u,v)$ in $\mathcal{C}$ to the boundary) using ray length per ...
1
vote
1answer
161 views

3D interpolation to 'm x n' matrix

Let's consider an example: Case 1: ...
10
votes
3answers
737 views

How can I speed up my compiled RBF interpolating function?

Overview I have a function that acts like the Interpolation on sparse $n$-dimensional data using a simple implementation of RBF interpolation method. I want my ...
1
vote
0answers
60 views

Interpolation with symbolic variable to speed up numerical integral [closed]

I have the following integral: $$E(r) = \int^{\infty}_0 e^{-x^2} e^{i\pi(ax^2 - \frac{x}{\Delta})}J_0(r\,x)x \,\mathrm{d}x,$$ where $J_0$ is the zeroth Bessel function of the first kind. Two ...
5
votes
4answers
1k views

Finding intersections of two parametric curves

I am dealing with the root finding of two parametric data curves (data below). I have already checked Parametric Interpolation of 2D data, which I found useful for plotting, though it is not adequate ...
1
vote
1answer
143 views

InterpolatingFunction::dmval error in the Piecewise function with an interpolation funcion included

I have a set of data, first I deal the data with an Interpolation function. excitef1 = Interpolation[ps1] Then I use a Piecewise function to expand the range of ...
2
votes
3answers
291 views

calculate missing values, Interpolation

I've following data: ...
0
votes
1answer
482 views

Cosine interpolation

Suppose I have a list of values of a function $f(x)$ at positive integer points, say $$f(1) = -0.5, f(2) = -0.5, f(3) = 1, f(4) = -0.5, f(5) = -0.5, f(4) = 1,...$$ Can I interpolate a cosine function, ...
0
votes
1answer
117 views

Where do two bicubic-interpolated surfaces intersect a plane?

I have two surfaces, $p_a$ and $p_b$, described by two matrices. I want to find out if both surfaces intersect with the planes $q_a$ and $q_b$ respectively for any pair of x and y coordinates. To do ...
5
votes
4answers
163 views

Constructing a list

I need to use the interpolation function on some data so I can integrate it. I have an array with 1400 subsets and there are 1400 elements in each subset: ...
2
votes
2answers
775 views

How to create InterpolatingFunction from data?

If I have a function at a number of non-uniformly spaced data points: youtReal[7.8]=2.0332;, youtReal[8.54]=6.24352354;.................. ......... and the ...
3
votes
2answers
92 views

Motion study using initial conditions

I think I'm making a mistake to reach my goal. I would like to find an $x[t]$ function that could describe the following conditions: 1 - The object is in position $x=151$ (meters) at time $t=5$ (...
1
vote
3answers
210 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 ...
1
vote
0answers
68 views

Speeding up a minimisation involving Numeric integral and Interpolating function

I am doing a minimisation procedure to obtain best fit parameters a,b,NN for a model involving a numeric integral and an interpolation function. The code as written ...
0
votes
2answers
489 views

Interpolating noisy data

My data looks like this: https://pastebin.com/n59CTB3L Or if displayed in log chart: I want to create an interpolation of the data that would remove most of the noise. What are some good ways to ...
0
votes
1answer
362 views

How do I interpolate sparse data with a spline?

I have this data: data = {{0.2, 103}, {2, 13.9}, {20, 2.72}, {200, 0.8}, {2000, 0.401}, {20000, 0.433}} Is there any way of finding value at $x=5$ using ...
3
votes
1answer
204 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 <...
3
votes
2answers
281 views

Integrate only one variable of a 2D interpolating function

Lets say I have generated a 2D interpolating function using the code: ...
5
votes
1answer
892 views

Hermite interpolation

The well known Hermite interpolation uses piecewise cubic polynomials and fits the knot values and derivatives. In contrast the Mathematica piecewise Interpolation ...
1
vote
1answer
72 views

Line Equations from Interpolated Data

I have an interpolated line from a series of measured data points. Is there a way I can get Mathematica to output an approximate equation for the interpolated line? For example: From the ...
0
votes
1answer
74 views

Plotting continues field's properties by having some points information

Having information of a vector field in some discrete points in 2D space(points and vectors are both in 2D), how can one plots (approximate) divergence of the vector-field in the total space(not in ...
2
votes
1answer
220 views

Styling a ListLinePlot

Pretty new to mathematica and stack exchange, so feel free to explain it like i'm 5! Essentially, I have a (mostly) working ListLinePlot in Mathematica, but would like to change some things in the ...
0
votes
2answers
84 views

Functional derivatives of interpolated data

I have set of experimental data: points={{0, 0}, {1, 2}, {3, 3}, {4, 4}, {5, 3.5}, {6, 3}, {7, 2.5}, {8, 2}, {9, 1}, {10, 0}} and I would like: 1.) interpolate these points: fun = Interpolation[...
2
votes
3answers
195 views

Ways to quicken numeric integral over interpolating spline?

I have an integral of the form $$\int_1^{15000} f_1(k) f_2(k) dk,$$ where $f_1(k)$ is an interpolating function and $f_2(k)$ is some multiplicative function of k. I'm working with the following <...
2
votes
2answers
806 views

Cubic spline Interpolation [closed]

I'd like to fit a cubic spline object to some data in mathematica. I think I'm ok in how to set it up, I just need a little help with some of the syntax. I'd like to generate a list of data first ...
0
votes
0answers
145 views

Smoothing a Graph using Interpolation

So the following code uses WeatherData to get a list of longitude, latitude and maximum wind-speed from 400 weather stations around Dallas and plots the data. <...
2
votes
1answer
435 views

How to take the derivative of a NDSolve solution?

I have solved and plotted a system of differential equations, shown below, using Mathematica's NDSolve function. Now I would like to take the derivative of one the resulting interpolating functions ...