필터 지우기
필터 지우기

Multiple initial conditions differential equations

조회 수: 3 (최근 30일)
Zach
Zach 2011년 5월 31일
Is there a way to solve multiple initial conditions in the same ode solver?
  댓글 수: 1
Zach
Zach 2011년 5월 31일
To be more specific I have a bunch of points consisting of x and y coordinates. Each point is considered an agent. And each agent has it's x and y coordinates determined by it's own x and y direction DE. I have this set up in a GUI where the students select the number of agents and the two DE's. I was looking for a way to only use one x array and one y array to solve all the different point (agents) for the same time step. If this is two vague I can try and explain it more clearly.

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

채택된 답변

Matt Tearle
Matt Tearle 2011년 5월 31일
There's no immediate way to do this (AFAIK). Some possible workarounds would be to make a larger system of equations (ie just stack the x-y pairs into one big vector), or to run multiple times and specify the time points where you want the solution. In the latter case, you could either do this for all runs or for the first and then use the times returned for that run as inputs for the remaining runs.
(Dumb question: is there any reason they have to be at the same time points? If, for example, you're just plotting the results, would you even notice the time points?)
  댓글 수: 2
Zach
Zach 2011년 5월 31일
thanks! and the reason for all having the same time points is cause i'm plotting each agent after every time step. I think I'm slowly working my way towards something.
Matt Tearle
Matt Tearle 2011년 6월 1일
OK, if you want it simultaneously, maybe you could go with the first approach of making it a big system of (repeated) equations.

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

추가 답변 (0개)

카테고리

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