How to combine the trapezoidal rule with interpolation in ode23t function
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ode23t is an implementation of the trapezoidal rule using a “free” interpolant. what does “free” interpolant mean? I don't understand how to combine the trapezoidal rule with interpolant.
1 Kommentar
Torsten
am 1 Apr. 2023
Maybe you find your answer here:
Or in the papers at the bottom of the solver documentation:
Antworten (1)
John D'Errico
am 16 Mai 2023
Bearbeitet: John D'Errico
am 16 Mai 2023
A FREE interpolant is one where the nodes are not fixed in advance.
For example, suppose I choose to interpolate sin(x), on the interval [0,pi]. I MIGHT decide to use nodes at these points, chosen in advance as equally spaced:
F = @sin;
X1 = linspace(0,pi,8);
Y1 = F(X1);
plot(X1,Y1,'-o')
Are those the best set of nodes to use here? Maybe, maybe not. They are fixed, in advance, equally spaced.
Instead, I might decide to shoose a better set of nodes, with a denser packing where the function is more highly curved. In that case, I might call them free nodes.
When you use trapz, you are in a sense, again using a set of fixed nodes. That is, YOU make the choice about where to evaluate the function to be integrated, NOT the code. In the case of ODE23T, the code is making its own choice about where to place the nodes, chosen for the best result by some measure.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!