Skip to content

Commit 73cdce0

Browse files
committed
fixed bug where old IVP Solver Toolbox syntax was used for matrix-vector IVP conversions
1 parent 015bf38 commit 73cdce0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

EXAMPLES.mlx

9.78 KB
Binary file not shown.

Riccati_Differential_Equation.pdf

140 Bytes
Binary file not shown.

solve_riccati_ode.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
% [t,P] = solve_riccati_ode(A,B,Q,R,S,PT,tspan)
88
%
99
% Copyright © 2021 Tamas Kis
10-
% Last Update: 2022-08-28
10+
% Last Update: 2022-12-08
1111
% Website: https://tamaskis.github.io
1212
1313
%
@@ -92,7 +92,7 @@
9292
dPdt = @(t,P) -(A.'*P+P*A-(P*B+S)/R*(B.'*P+S.')+Q);
9393

9494
% converts matrix-valued ODE to vector-valued ODE
95-
dydt = mat2vec_ode(dPdt);
95+
dydt = mat2vec_ODE(dPdt,n);
9696

9797
% converts matrix initial condition to vector initial condition
9898
yT = mat2vec_IC(PT);
@@ -102,7 +102,7 @@
102102

103103
% transforms solution matrix for vector-valued ODE into solution array
104104
% for matrix-valued ODE
105-
P = vec2mat_sol(y);
105+
P = vec2mat_sol(y,n);
106106

107107
% reorders t so that time is increasing
108108
t = flipud(t);

0 commit comments

Comments
 (0)