convert continuous time ODE into discrete ODE

조회 수: 1 (최근 30일)
Mahboubeh Zareijalalabadi
Mahboubeh Zareijalalabadi 2016년 2월 18일
댓글: Shreya Yawalkar 2020년 7월 20일
Hi, I have a continuous time ODE like dy(t)/dt=f(y(t),t) and I want to make the equation discrete like y(k+1)=f(y(k)). I know function c2d can do this but I don't know how to apply this function to a ODE equation. in the help page there is nothing about ODEs.

답변 (1개)

Star Strider
Star Strider 2016년 2월 19일
If you want your differential equation solved (or the results reported) at specific, predetermined times, give it a vector of specific times instead of simply a range.
For example:
t_min = ...; % Start time
t_max = ...; % End time
n_points = ...; % Number Of Points In Time Vector
tspan = linspace(t_min, t_max, n_points);
Then use this ‘tspan’ vector in your differential equation solver call.
  댓글 수: 1
Shreya Yawalkar
Shreya Yawalkar 2020년 7월 20일
could you please give a example demonstrating the explanation?

댓글을 달려면 로그인하십시오.

카테고리

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