<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#330000">
On 03/10/2011 18:08, Serge Steer wrote:
<blockquote cite="mid:4E89DE03.2010608@inria.fr" type="cite"><br>
R=rand(5,5);R=R+R';//creates a symmetric matrix
<br>
[S,K]=schur(R) //R=S*K*S';
<br>
K=diag(K);
<br>
E=exp(K*t)
<br>
x=zeros(size(x0,'*'), size(t,'*'))
<br>
for i=1:size(t,'*')
<br>
x(:,i)=S*diag(E(:,i)*S'*x0
<br>
end
<br>
Here you can also use the ode solver to do the job
</blockquote>
<br>
Serge, <br>
<br>
do you know if x(:,i)=S*diag(E(:,i)*S'*x0
has to compute S' each time? or the parser is smart enough to
compute S'*x0 without computing S' ?<br>
<br>
if not, when t is very large, one should calculate S' once before
the loop, don't you think?<br>
<br>
<br>
<div class="moz-signature">-- <br>
Adrien Vogt-Schilb (Cired) <br>
Tel: (+33) 1 43 94 <b>73 77</b></div>
</body>
</html>