4
votes
Accepted
How to speedup integration of interpolated function with logarithmized data?
I suggest that you try to use the substitution formula:
$$
\int_a^b \int_c^d f( \varphi(x),\psi(y)) \, \varphi'(x) \, \psi'(y) \, \mathrm{d}x \, \mathrm{d}y
=
\int_{\varphi(a)}^{\varphi(a)} \int_{\psi(...
- 101k
3
votes
Accepted
Plotting Polar Solution of NDSolve
Knowing the parametrized solutions r[t] an theta[t], we can transform them to Cartesian coordinates and use ParametricPlot:
...
- 37.7k
3
votes
Conversion of an expression to function yields Tag Plus in ... is Protected error
The relevant part of your code appears to be:
degree = 3;
polyFunc = Total[Table[x^i, {i, 0, degree}]];
Now you want to make polyFunc into an actual function. Try:
...
- 67.1k
2
votes
Accepted
Interpolation with replacing start and end values;
I hope I understand your question correctly. You want to rescale the y data. This can be done with the function "Rescale". We first need to determine the max and min of the original data:
<...
- 37.7k
2
votes
Interpolation with replacing start and end values;
You can choose the domain on the second argument of ListInterpolation:
...
- 19.5k
1
vote
Why these two ways of interpolations give different results?
I doubt very much about the sense of your attempt "interpolate a distribution".
With a little help NIntegrate evaluates similar results. You only have to ...
- 43k
1
vote
1
vote
Combining two interpolating functions via Piecewise or If is very slow
Perhaps avoid SubValues and even DownValues. The problem is set up for simple table look up, and with this approach, it is just ...
- 226k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
interpolation × 988plotting × 181
differential-equations × 141
numerical-integration × 118
list-manipulation × 77
finite-element-method × 70
fitting × 60
equation-solving × 51
calculus-and-analysis × 51
data × 46
splines × 43
numerics × 42
functions × 40
performance-tuning × 33
graphics × 30
function-construction × 27
bugs × 25
mathematical-optimization × 25
warning-messages × 25
polynomials × 20
mesh × 20
piecewise × 15
graphics3d × 13
export × 11
smoothing × 11