필터 지우기
필터 지우기

ODE with discrete, external input

조회 수: 7 (최근 30일)
Mario Trevino
Mario Trevino 2011년 4월 5일
댓글: Torsten 2014년 11월 3일
Hi everybody, I want to solve a simple ODE for specific discrete time points in which constats are updated externally for each specific t value. vgr
t=1:100; dy/dt=kt;
where k is a external vector with length=length(t) and wich is considered in the equation for each t.... any help? thanks in advance

채택된 답변

Arnaud Miege
Arnaud Miege 2011년 4월 5일
Look at the third example on the ode solver documentation.
HTH,
Arnaud
  댓글 수: 2
Mario Trevino
Mario Trevino 2011년 4월 5일
thanks, I found the same hint in the ode faqs.
It works
Sergio
Sergio 2014년 10월 31일
Hi Arnaud Miege, what would you suggest if the discrete ODE is a (2x2) system? Expanding the first question
t=0:0.02:1;
dxdt = Constant*K1;
dydt = Constant*K2;
where K1 and K2 are both external vector with length=length(t)? and both depending of two variables (x,y)?
Interp1 from matlab would be wrong since we would be interpolating in one dimension while the system is 2D.

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

추가 답변 (1개)

Torsten
Torsten 2014년 10월 31일
Use
if K1 and K2 don't depend explicitly on t, but on the dependent variables x and y.
Best wishes
Torsten.
  댓글 수: 4
Sergio
Sergio 2014년 10월 31일
편집: Sergio 2014년 10월 31일
Thanks! but I still don't understand! Sorry!
I have another example here which is more easier but which can help me to understand.
Assume I have:
x1 = 40:0.005:55;
x1=x1';
x2=40:0.005:55;
x2=x2';
And then I discretize the following function:
V1=x1.*(0.2-0.005*x2);
V2=x2.*(-0.5+0.01*x1);
How can I use griddata now? And how can I solve this as an ODE?
Torsten
Torsten 2014년 11월 3일
Sorry, but meanwhile, I don't understand what you are trying to do.
Please specify more clearly:
What is the ODE you are trying to solve ?
Which MATLAB program are you trying to use to solve your ODE ?
Which kind of external input data do you have and where do they enter the ODE ?
Best wishes
Torsten.

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

카테고리

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