How to combine the trapezoidal rule with interpolation in ode23t function
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Torsten
le 1 Avr 2023
Maybe you find your answer here:
Or in the papers at the bottom of the solver documentation:
Réponses (1)
John D'Errico
le 16 Mai 2023
Modifié(e) : John D'Errico
le 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 commentaires
Voir également
Catégories
En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!