How are propagation points connected?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Steven Lord
2022년 6월 29일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!