360 views

How can I extract the raw data points with which NDSolve uses internally to make the InterpolatingFunction? [duplicate]

I have a set of ODEs solved with NDSolve which returns InterpolatingFunctions. When I am trying to plot them, it takes a long time to render. I am guessing that adaptive subdivision for the sharp ...
• 31
283 views

Getting numerical values from integrated interpolating function [duplicate]

I have a list of data. I integrate them with interpolation. Lets say is the following: InterpolatingFunction[{{0.01, 4.82}}, <>][x] However, is that ...
• 309
1 vote
151 views

Understanding the structure of an InterpolatingFunction [duplicate]

FunctionInterpolation[x^2, {x, 0, 9}] // InputForm returns: ...
• 14.3k
55 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?
• 5,703
156k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
6k views

How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
• 775
5k views

Chebyshev Approximation

Is there functionality in Mathematica to expand a function into a series with Chebyshev polynomials? The Series function only approximates with Taylor series.
• 295
3k views

Interpolating data with a step

Suppose I have some data with a step in it: data = {{1, 1}, {2, 2}, {3, 3}, {3, 4}, {4, 5}, {5, 6}}; Interpolation will complain about this and not give you an ...
• 14.2k
2k views

How to obtain adaptive sampling as in Plot function?

Adaptive sampling in Plot function can capture the oscillation of a function with very few points. How can I get a similar sequence of point pairs without using <...
• 2,561
7k 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 ...
546 views

Function for a series of joined slopes

I need a function for a series of joined slopes and my solution feels a bit kludgy. Is there a better way? A list of pairs of transition points and slopes: ...
• 271k
890 views

Getting rid of spikes in the PDE solution

Bug introduced in 10.0 and fixed in 10.3 Note: In 10.0, Rationalize[fd, 0] was needed or mesh generation would fail. Preamble: I am solving a PDE in a domain ...
• 39.4k
1k views

How can I get a discrete result from NDSolve?

When I use NDsolve to solve a differential equations, it returns an interpolation function of the discrete result. Because I haven't found another way to do Fourier ...
• 285
2k views

Transform an InterpolatingFunction

I'd like to transform an InterpolatingFunction from NDSolve but can't figure out how. Here's an example. The equation I want to solve is ...
• 20.2k
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 ...