필터 지우기
필터 지우기

Using a large integration range and ode45

조회 수: 2 (최근 30일)
pxg882
pxg882 2012년 12월 6일
Hi all,
I have a set of equations that needs to be solved over a very large domain (say x > 1000, where x is the integration range).
What is the best way to do this to ensure accurate results using ode45?

답변 (1개)

Jan
Jan 2012년 12월 6일
This is a very general question. Therefore only a general answer is possible.
  1. Create the function to be integrated correctly, e.g. avoid numerical problems.
  2. ODE45 and the other intergrators of Matlab require smooth functions. Therefore avoid commands like: IF, RAND, DATE, TIME, ABS, etc.
  3. Adjust the relative and absolute tolerance appropriately. It is hard science to define this term accurately.
  4. Control the senistivity of the result to variations of the input: Start the integration at y and y+eps(y) and compare the effects. If small variations produce large differences, the system is instable and an accurate integration is not possible with the current choice of tolerances.
It is unclear, why "1000" should be very large. If you simulate vehicel dynamics of a car on different terrain and the measurement units are seconds, this is a small period. If you simulate the molecular dynamics in the engine of the same car, 1000 seconds would be hilariously gigantic.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by