# Tagged Questions

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

220 views

### How to evaluate differential entropy from raw data?

I want to evaluate the differential entropy according to here $$h(X) = - \int f(x) \log{f(x)} dx$$ where $f$ is the probability density function. Lets create some test data (normal distribution): <...
216 views

### Hermite method in Mathematica

When I solve the example below, in the results it is mentioned that Mathematica 10 has used the Hermite method. I cannot find anything about this in the Mathematica documentation. Is there nothing ...
180 views

### BSpline or other curve through arbitrary ordered sequence of two-dimensional points

How does one create a BSplineCurve or other smooth curve passing through each point in an ordered list, where the curve may be non-simple, i.e., can double-back ...
125 views

### Combination of interpolations doesn't work?

I have tables of function values f[i_] and g[i_] and I need to plot various combinations of the function and its derivatives (...
139 views

### Interpolation of Singular Functions

I am trying to interpolate discontinuous functions for R in interval $[0,100]$ and r in interval $[0,100]$: ...
144 views

### Series expansion of InterpolatingFunction obtained from NDSolve

I am trying to obtain a series expansion of the numerical solution of a differential equation. I encounter difficulties going beyond first-order expansions which I believe might be due to my inability ...
113 views

### NDSolve with a constant

I have a simple differential equation like this s = NDSolve[{y'[x] == A y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}] where $A$ is a constant. Mathematica gives ...
465 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 ...
1k views

### Suppress extrapolation of interpolating function in a ContourPlot

I have defined an interpolating function, myfcn[x], valid on the domain x = 0 to 1.5. I am then using ...
163 views

### Fast list interpolation over common x,y for multiple variables

I have a (long, >50K elements) unstructured list with a header similar to; AList[[1]] = {x,y,z,var1,var2,var3,var4,...,varN} I want to interpolate z, var1, var2, ...
303 views

### Temporal database reconstruction in mathematica

<EDIT> after some internet research I found the database domain that deals with this kind of thing: Temporal Databases. I think my question therefore becomes how to reconstruct a temporal ...
916 views

### Curve fit based on minimal data

Inspired by the fantastic answers here and here, I would like to ask a questions along similar lines. I have 6 curve types that follow these rules: Type A: If point 1 is positive and point 2 is ...
945 views

### Multidimensional interpolation with duplicate abscissa values [duplicate]

I am trying to do a first order interpolation on a multidimensional data set containing duplicate abscissa values (which Mathematica does not like), like this one: ...
65 views

### Show actual Interpolation function [duplicate]

Is there a command to show the actual function when using the Interpolation command? For example, f = Interpolation[{1, 2, 3, 5, 8, 5}] returns ...
721 views

### Can I use the values of interpolating points from NDSolve's output? And How?‎

The output of NDSolve is a (list of)InterpolatingFunction(s). In standard output format the ‎elements of interpolation are not ...
1k views

### Extracting the function from InterpolatingFunction object

I've used Interpolation[] to generate an InterpolatingFunction object from a list of integers. ...
349 views

### Interpolation on an unstructured (mostly-structured) grid in 4D+

I frequently need to perform interpolations on an unstructured grid. Mostly, with the purpose of filling grid holes and then later continue with regular grid interpolations. Mathematica V9 and V10 ...
539 views

### Interpolating an Antiderivative

I'd like to be able to make InterpolatingFunctions for antiderivatives of functions that can't be integrated symbolically. However, the following code returns ...
133 views

### Replace $z$ with interpolated function and plotting

I start off with this equation $z(x,y) = sin(xy)$. I create an interpolation from $0 < x < 5$ and $0 < y < 5$. I then use this interpolation on a simple function $w(x,y) = x + y + z(x,y)$ ...
290 views

### Integrating Squared of Interpolating Function with respect to one variable

I am interested in evaluating a two dimensional interpolating function produced by solving the wave equation. Here is the code that includes the resulting interpolating function. ...
335 views

### How do I feed data points into an equation to solve NUMERICALLY?

I start with this equation and solve it numerically for $z(x,y)$ in the range $1 < x < 5$ and $1 < y < 5$: $$\frac{3}{xyz} - 2x - 3y - 5z = 0$$ Then using the data points of $z$ above, ...
398 views

### interpolating function over dates

I've got a bunch of readings at various dates and times. I'd like to be able to interpolate and then integrate over, say days. I can do this by converting my date/time to ...
116 views

### Is there a reason why some specific arrangement of scattered grid points would yield bad RBF (Obtuse package) interpolation results?

I have an arrangement of grid points given by the figure below (the datagrid data is posted below at the end of the post): They correspond to electrode positions of an EEG signal. I am ...
618 views

### Object separation from a 2.5D surface

I'm trying to identify the shape and the boundaries of objects. The data was generated with a laser scanner and represent the surface of an area in which many boulders lay on the ground and making up ...
3k views

### Find maximum value of interpolation function - obviously wrong result

Minimizing and maximizing interpolation function has already been asked and answered, see here for example. Yet, I observe a strange behaviour. Well, I can understand that the wrong guess of ...
412 views

### Interpolation of 4D data

To create a table and an interpolation function of 3D data T=f(X,Y) I have the answer here: interpolation of 3D data How to create a table/interpolation function of 4D data T=f(X,Y,R)? If I do <...
237 views

### Incompatible InterpolatingFunction between V9 (and earlier) and V10

Bug introduced in 10.0.0 and fixed in 10.0.1 I am encountering compatibility issues when loading DumpSave(d) definitions in V10 that have been created with ...
323 views

### Issue in ParallelTable after evaluating another function using NDSolve and FindRoot. What is wrong with this inverse?

I am trying to find the inverse of a function which is defined through NDSolve and NIntegrate. The question is pretty similar ...
94 views

### Interpolation function evaluation and timing

Lets define two identical functions $f$ and $g$ in a slightly different way ...
457 views

### Problem when defining function through NIntegrate and NDSolve and Interpolation - Bug?

More than a single question, I have some doubts about the output of certain functions when defined through the result of other calculations. I am an active user of Mathematica, but maybe I haven't ...
122 views

### Removing some data and replacing them with new ones

I have a data list where the elements have the form (time, velocity ). I need to remove some malformed elements in places where the data does not change smoothly and then replace those points by ...
147 views

### How to generate specific function using BSpline command?

I want to generate an approximation function that fits a curve to points. My goal is to obtain an actual formula. Is this possible with BSplineFunction? Using the ...
979 views

### Piecewise Polynomial Interpolation

Given some data pairs $(x_i,y_i)$, with $i=0,...,m$, and a degree $r$, I wish to build a piecewise polynomial function to interpolate these data. That interpolation should be continuous, and, on every ...
185 views

### Interpolation function rejected by ParametricPlot3D

I was playing around with the bouncing ball example, and decided to make a 3d version. I decided to use ParametricPlot3D for a simple independent 3D presentation....
239 views

### Zero-order interpolation not going fully around

Connected to this question, I want to do a zero-order interpolation of a bunch of datapoints which is periodic. The code I use is as follows: ...
158 views

### FunctionInterpolation error when specifying AccuracyGoal

Bug introduced in 8 or earlier and persisting through 10.4 or later In the help page ref/message/FunctionInterpolation/ncvb, it is mentioned that one should ...
3k views

### Smooth 4D (3D + color) plot from discrete points

I have a file containing isosurface $\{x,y,z,F\}$ data (around 9000 points). My goal is to generate a smooth (NOT a discrete set of points!) colored surface using ...
693 views

### Extract X value from corresponding Y value from a List or Transpose [duplicate]

I have a list of X values and Y values separately, and also together with: data=Transpose[{X,Y}] This data is from a chromatogram, and I want to extract the ...
599 views

### Find polynomial equation for set of 3D data

data was given in columns in the order {y, x, z}, with y dependent on x, z ...
3k 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 ...
265 views

### Function that is a good fit to the plot made with SmoothHistogram

How can I find a function that fits the plot from the SmoothHistogram function? For instance if I have data like this and plot a Smooth Histogram, how can I get a function that fits the plot? ...
288 views

### Better code for two variable fractal interpolation functions

I am trying to write code for 2-variable fractal interpolation functions using two iterated function systems and two starting functions (both $y(x)=x$) which creates a sequence of piecewise defined ...
588 views

### Interpolating a plot with missing values

With data = {{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 5}, {8, 4}, {10, 3}, {10, 2}, {11, 1}} and ...
980 views

### Integrating a functional of an InterpolatingFunction

It is straightforward to Integrate an InterpolatingFunction. However, even for a simple functional of an ...
102 views

### ReplaceAll in an expression including large InterpolatingFunction

I have a large InterpolatingFunction that I'm transforming to another basis with a few simple multiplications and additions by (symbolic) constants. The ...
216 views

### Requiring NumericQ in Pure Function

Potential duplicate, but doesn't seem to solve my problem: Using patterns in pure functions I have a function that returns an InterpolatingFunction, and it works ...
200 views

### Zooming into Parametric Animation Plot that Uses InterpolatingFunctions

I have an interplanetary trajectory solver that calculates a spacecraft route from Earth to Mars, and I am trying to zoom into the spacecraft when it reaches its Mars intercept orbit but am having ...
93 views

### Strange behaviour of “Make Table” with exponential function

I am trying to create a simple interpolation of 1-Exp[-x^2] function, over the logarithmic grid, but I am stuck due to some unexpected behaviour: ...