ODE2STAB

버전 1.0.0.0 (1.93 KB) 작성자: Francisco de Castro
Integrates systems of differential equations until stability is reached (or time is over)
다운로드 수: 1.1K
업데이트 날짜: 2009/9/2

라이선스 보기

[TOUT,YOUT]= ODE2STAB(ODESOLVER, ODEFILE, TSPAN, Y0, TCHUNK, MAXCV)
with TSPAN = [T0 TFINAL], integrates the system of differential equations stored in file ODEFILE until stability is reached or until the time specified in TFINAL, whatever happens first. Stability is specified as a maximum coefficient of variation MAXCV for all components of the solution. The first argument (odesolver) must be a function handle for one of the MATLAB ODE solvers, i.e. @ode45. Y0 is a vector with the initial conditions.

The function integrates the system in 'chunks' of time specified in TCHUNK, which should be sufficiently smaller than TFINAL-T0. After each integration run, the two conditions are chequed. If the coefficient of variation of all the components of the solution is smaller than MAXCV OR we have reached TFINAL, the integration stops.

Example:
First create a file called odelogist.m as:
% ----------------------------------
function dn= odelogist(t,x)
dn= zeros(1,1);
dn(1)= (0.01*(1-(x(1)/10)))*x(1);
% ----------------------------------

odefile= 'odelogist';
tspan= 1:10000;
Y0= 0.01;
tchunk= 100;
maxcv= 10^-3;
[t,x]= ode2stab(@ode45,odefile,tspan,Y0,tchunk,maxcv);
plot(t,x)

Integration stops at time 1101, instead of 10000.

인용 양식

Francisco de Castro (2025). ODE2STAB (https://kr.mathworks.com/matlabcentral/fileexchange/25201-ode2stab), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2009a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0