How are propagation points connected?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I am approaching the numerical propagation of ODE for the first time, so maybe my question is very stupid.
Anyways, supposing I am using a Runge Kutta 45 integrator to make my propagation in time (so, a 4th order integration scheme), I was wondering how Matlab connects the propagation point while, for example, plotting the results. Are the solutions at each integration time step connected by a simple line or some other kind of interpolation is performed among them, maybe in accordance with the order of the integration scheme itself?
Thank you!
Marco
0 commentaires
Réponses (1)
Steven Lord
le 29 Juin 2022
The plot function connects the points you specify with straight lines. As the number of points you plot increase the curve looks more curved, as you can see in the examples below.
Now if you're asking about the computations performed inside ode45 that's a bit different.
for numPoints = [3:10 50 100]
x = linspace(0, 1, numPoints);
y = x.^2;
figure
plot(x, y, 'o-');
title("Approximation of x^2 with " + numPoints + " points")
end
0 commentaires
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations 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!