Questions tagged [interpolation]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
24 views

Variable order in InterpolatingFunction

I'm attempting to deal with a interpolating a function $f[x,t]$ on an unevenly spaced grid of $n$ points. My x-variable is continuous, so there's no difficulty in fitting a cubic spline to it with ...
0
votes
0answers
56 views

Derivation of Interpolation function

I have a problem to derive an interpolation function. I am quite new to mathematica, so I suspect I miss something. I have a list of values of 1000 values (L) that represents a function that I want to ...
1
vote
1answer
91 views

Making function from data by using interpolation

I Have two set of data separately, which one of them is pressure and the other one is energy density.(P: pressure, E: energy density) I want to use these data as a function, P(E) or E(P) by using ...
2
votes
3answers
181 views

Using NIntegrate with interpolating function

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. This is actually inline with a previous question I had asked about a week ...
3
votes
1answer
34 views

Integrating a Interpolation function with domain {0,1} and output dimension >1: I don't understand this behavior--can anyone help me out?

My goal is to integrate the last dimension of the output of an Interpolation function. I am getting behavior that I don't understand (note to readers, I've pasted all the code without comments at the ...
3
votes
1answer
196 views

Interpolation of points in 3D with smooth space curve

In Mathematica we have ListSurfacePlot3D for reconstructing surface from list of points in 3D. But I can not find something similar if I want to reconstruct a curve ...
1
vote
1answer
46 views
0
votes
0answers
65 views

Using Reduce with a Interpolation function

I am trying to find all the solutions of an equation that contains an interpolation function int, where int=Interpolation[data] (...
1
vote
0answers
67 views

Numerical integration of a function with several variables

I need to calculate the next integral $$ F_l(R)=\int_0^{\infty} {dk k^2j_l(k R)*2*\exp[-0.36k^2](k)\rho_l(k)(18/k^2)P_l(\cos{\beta})}$$ where ρl(k) is given by $$ \rho_l(k)=\int_{0}^{\infty}{dr r^2 ...
1
vote
0answers
63 views

Numerical Definite Integral of Numerical Laplace Transform

I'm having problem taking the numerical definite integral of a numerical Laplace transform that depends on two variables due to NIntegrate:inumr errors: ...
3
votes
1answer
89 views

Numerical Laplace Transform of InterpolatingFunction

What are some ways to find the numerical Laplace transform of an InterpolatingFunction? (I know that numerical Laplace transforms are rarely used but my application requires a numerical evaluation). ...
4
votes
1answer
78 views

Using/ Extracting data from Interpolating Functions returned from NDEigensystem

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. I am able to get the accurate energy eigenvalues but am having problems with ...
3
votes
1answer
92 views

Semi-periodic Interpolation

I have a set of data, e.g. damped waves in a finite box of size L, so that the data is periodic in space but not time. At a particular instant in time, i.e. taking a cross section of ...
1
vote
1answer
89 views

Problem solving a function using FindRoot and then plotting it

When I run the following code: ...
0
votes
1answer
33 views

find the planar curve that passes two given points, whose tangent directions at these two points are also given

This is related to drawing the links and joints of a robot manipulator. I'd like to find a way to generate a link bwtween two given bars (joints), and the said link has to be normal to the two bars ...
9
votes
2answers
285 views

Unexpected 'switch' of partial derivatives when differentiating InterpolatingFunction

Bug introduced in 11.3 or earlier and persisting through 12.1.0 or later - Fixed in Version: 12.1.1 In short, there is a simple initial boundary-value problem for which NDSolveValue produces an ...
1
vote
1answer
207 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: ...
1
vote
0answers
49 views

Axial Symmetric 2D Cylindrical Field to Cartesian 3D Field

Previously, I've used 2-dimensioned [radius, zeta] output from NDSolve ({InterpolatingFunction, InterpolatingFunction}] and used the FieldTransform to convert the axial-symmetric cylindrical slice to ...
4
votes
2answers
386 views

How can I resample a list of {x,y} data for evenly spaced points?

I have generated a list of {x,y} points using a position function of a particle moving in 2D space. If you run the following code you'll see a small bit of the particle's motion (I cut out most of it ...
4
votes
1answer
151 views

How to represent flux in a shape

I used Tim Laska's solution here for raytracing, and modelled 10000 photons impinging onto a cone. ...
1
vote
1answer
47 views
1
vote
2answers
757 views

Finding a third degree polynomial that passes through given points

If I have three points xi-1,xi, xi+1 where y(xi) =1 and y(xi-1)=0, y(xi+1)=0 (basis function) and I need to define a line that passes through these points I will use the line equation y-y1=(y2-y1) /(...
12
votes
2answers
383 views

Rescaling data to make a “continuous” function

I have acquired many sets of data, which all represent a single function, but which are randomly rescaled by a constant (due to the measurement specifics). I'm looking to effectively stitch them ...
18
votes
1answer
422 views

Adding Regularisation to Built-in Interpolation function

tl;tr; How to improve performance of regularised Interpolation? Context Since Version 12, Mathematica now incorporates a range of (underrated IMHO) ...
12
votes
3answers
2k views

Approximately Fit Data Without FindFit

I have some noisy data, and I'd like to analyze the derivative of the function the data approximately matches. Interpolation is normally great, but doesn't work ...
2
votes
2answers
51 views

Cannot understand meaning of “identical”

This came up in the context of plotting solutions to NDSolve, but I've reduced it to the following issue. This really has me scratching my head. ...
3
votes
3answers
248 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? ...
2
votes
1answer
46 views

Extrapolation Handler and NIntegrate: Bug?

I have an list of data which I interpolate such that it returns the value 0 in case I give it values outside of its domain: ...
0
votes
0answers
48 views

Evaluating Interpolating functions from NDSolve to solve for a specific time, and evaluating the functions at that time

For one of my homework assignments in a mathematical modeling class, we were supposed to take a 2d system of second order differential equations, and convert it to a 4d first order system of ...
2
votes
2answers
92 views

How to make interpolation for data of closed shape?

I have a data that describes a closed shape, let here assume it is a circle ...
1
vote
2answers
115 views

Adding an interpolated function to neural networks through ElementwiseLayer

1.Trying to add an interpolated function to neural networks. ...
0
votes
0answers
53 views

Interpolated Hyperbolic tangent as a layer of a neural network

It is necessary to specify piecewise linear interpolation of the hyperbolic tangent. And substitute this function as a layer of a neural network. I tried a lot of things, please suggest your options.) ...
0
votes
1answer
50 views

How do I combine `InterpolatingPolynomial` and `Integrate`?

I want to find a real-valued polynomial (or trig) function f[x] that yields 0 at x=-a, and ...
0
votes
0answers
23 views

Interpolate and integrate data with error messages

If I have the following code, where cp74[j] represents a very long list (e.g. {{a,b}{c,d},{e,f},{g,h},...} for different j values. ...
0
votes
1answer
164 views

Lagrange Interpolation [duplicate]

I have the following table with 90 elements, and I want to write a loop that gives me the Lagrange operators. I want to construct an interpolation with Lagrange interpolation and show the loop to ...
2
votes
0answers
48 views

Multivariate polynomial data fitting formula

A short description: consider $f(x,y,z)=x^2+y^2-z^2$ we can know that $f(1,0,1)=0,f(0,1,1)=0$ ,etc. so we can get the roots of this polynomial. Now if given the roots of polynomial, how to solve ...
5
votes
1answer
184 views

Find a continuous map between two sets of 2D points

Given two sets of points in 2D points1 and points2 inside a rectangle, I would like to find a continuous map ...
1
vote
0answers
51 views

Why doesn't Sort work in this case ? (Only numerical values)

Context I want to interpolate a complicated symmetric function f of 2 variables x and y defined by some numerical integral involving Bessel functions. Since computing the integral itself is a bit ...
0
votes
1answer
44 views

How do I prevent the Interpolation function from giving negative values?

I've got an interpolation function: ...
0
votes
0answers
59 views

Elegant solving and plotting of multivalued solutions for a system of 2 equations with parameters using NSolve?

This looks long and complicated, but it's really not. I just tried to pose the problem well. I have to solve a relatively complicated system of equations that has 2 variables and 3 parameters. I ...
0
votes
0answers
63 views

Creating an interpolation matrix efficiently

I would like to know if there is a fast way to create the following matrix (note that the matrix is defined with arbitrary precision): ...
0
votes
2answers
65 views

Numerical integration of an interpolating function with another analytic function [closed]

I have to numerically integrate over $x$ a complicated function that has this structure $f(x,y)g(x)$ with a parameter $y$. In my case the fastest way to deal with it is generate an interpolating ...
0
votes
1answer
74 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
2answers
73 views

How to solve an algebraic equation with InterpolatingFunction?

How to solve the equation f[t]==0 for the function f[t] defined by differential equation,i.e. if ...
0
votes
0answers
48 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 ...
0
votes
1answer
39 views

Replacing sublists with criterion or Interpolation for a smooth curve

Supposing we have the following list (very small, can be copied into a notebook directly) ...
17
votes
3answers
2k views

2D smoothing spline interpolation

Does Mathematica have 2D smoothing spline interpolation built in? I requires an interpolation method with smooth first derivatives and cubic bivariate splines fulfill this nicely. In python I would ...
3
votes
2answers
66 views

Testing Positivity of Interpolating Function

I have an interpolating function and I want to test whether it is positive definite over an interval. Will any of Mathematica's numerical optimisation functions work for this or is there a simpler ...
12
votes
2answers
951 views

smooth spline through airfoil coordinates

I am trying to produce a smooth spline curve through a set of airfoil coordinates. An example for the data I am trying to use is here, and I am reading the file like so to get rid of some extraneous ...

1 2
3
4 5
18