Linked Questions

3 votes
1 answer

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 ...
QIZE SHU's user avatar
0 votes
1 answer

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 ...
Yincheng Liu's user avatar
1 vote
0 answers

Understanding the structure of an InterpolatingFunction [duplicate]

FunctionInterpolation[x^2, {x, 0, 9}] // InputForm returns: ...
anderstood's user avatar
  • 14.3k
4 votes
0 answers

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?
John Taylor's user avatar
  • 5,703
602 votes
19 answers

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 ...
43 votes
6 answers

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 ...
polyglot's user avatar
  • 775
17 votes
3 answers

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.
Sogartar's user avatar
  • 295
21 votes
4 answers

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 ...
wxffles's user avatar
  • 14.2k
22 votes
2 answers

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 <...
Kattern's user avatar
  • 2,561
16 votes
3 answers

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 ...
user avatar
11 votes
5 answers

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: ...
Mr.Wizard's user avatar
  • 271k
22 votes
2 answers

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 ...
Alexei Boulbitch's user avatar
7 votes
5 answers

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 ...
Bettertomo's user avatar
9 votes
4 answers

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 ...
Chris K's user avatar
  • 20.2k
8 votes
3 answers

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 ...
unlikely's user avatar
  • 7,103

15 30 50 per page
2 3 4 5