Solving Riccati differential equation with time variable matrix

Given: differential equation -P(t)AP(t) + Q(t) = dP(t)
A is known and constant Q is known for all time steps
Now I want to solve this equation to get P. How can i achieve this by using solver like ode45? I do not know how to include the time variable matrix Q in the solving algorithm.
Thanks in advance

Answers (1)

Hi,
look example3 in ode45
your Q is the same as g in this example

4 Comments

Thank you.
In example3 in ode45 the function g(t) can be exactly specified with g(t)= 3*sin(t-0.25) right? In my problem I do not have such functional relation for Q. Consider Q to be a matrix containing measured data gathered by observing a system for a while.
So i have to interpolate the Matrix like they did in step g = interp1(gt,g,t); % Interpolate the data set (gt,g) at time t
it shoudn't change anything, even if you don't have a formula.
you have a vector Q (n sample), and you just use this vector.
ok thank you.
If there are further problems, I will write them down here :)

Sign in to comment.

Asked:

on 16 Oct 2014

Edited:

on 16 Oct 2014

Community Treasure Hunt

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

Start Hunting!