Numerically solving a differential equation up to a certain value of the time dependent variable
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a second order differential equation
x''(t) = f(x)
with an initial condition x(0) = x0 ; x'(0) = 0; I wish to find the t value for which x(t) = 0;
Currently I am using ode45 to solve this (expressing it as two coupled linear odes) for some time range and linearly interpolating the solution between the two points where x changes sign. Given that I also have the gradient at this points it's fairly easy to fit a cubic spline but this really isn't accurate, there must be a better way of obtaining this solution! Doesn't anyone know how to go about this?
댓글 수: 0
답변 (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!