フィルターのクリア

Solving the same linear ODE with several initial conditions

2 ビュー (過去 30 日間)
Robert
Robert 2011 年 10 月 5 日
Hi, I want to solve a system of the form X(t)'=A*X(t) several times with different initial conditions. Of course, I could solve it separately for each initial condition in a loop, but I was hoping that there is a vectorized method for this.
Here's a more precise description of what I'm looking for: A is an NxN matrix. X0 is MxN where M is the number of initial conditions. TIME is a 1xT vector where T is the number of time bins I want for my solution. I would like a solution X that is MxNxT (or NxMxT, etc) that represents the solution to X'=A*X for each initial condition and at each time.
I first tried using expm since I could apply the result to the matrix X0, but I would need to calculate expm separately at each time bin (requiring a time loop).
I then thought of using ode45 since it takes a vector of times. But it takes only one initial condition (requiring a loop over X0).
Any ideas?

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by