How are propagation points connected?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Steven Lord
il 29 Giu 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 Commenti
Vedere anche
Categorie
Scopri di più su Ordinary Differential Equations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!