In ode45 is the initial state y0 column vector only?

function dy = rigid(t,y)
dy = zeros(3,1); % a column vector
dy(1) = y(2) * y(3);
dy(2) = -y(1) * y(3);
dy(3) = -0.51 * y(1) * y(2);
options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
[T,Y] = ode45(@rigid,[0 12],[0 1 1],options);

 採用された回答

Walter Roberson
Walter Roberson 2017 年 11 月 22 日

0 投票

No, you can use row vector initial state. The output of the ode function must be a column vector though.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange常微分方程 についてさらに検索

質問済み:

2017 年 11 月 22 日

コメント済み:

2017 年 11 月 22 日

Community Treasure Hunt

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

Start Hunting!