[scilab-Users] vectorization

Adrien Vogt-Schilb vogt at centre-cired.fr
Mon Oct 3 17:57:59 CEST 2011


Hi

Could you show us the actual loop?


On 03/10/2011 17:12, grivet wrote:
> Hello,
> I wish to solve a system of linear differential equations of first order
>     x' = Rx
> with R a symmetric matrix of coefficients. The formal solution is simple:
>     x = S*exp(Kt)*inv(S)*x(0)
> where S is the matrix that diagonalizes R:
>     K = inv(S)*R*S
> With Scilab, I would do, for instance,  t = 0:0.01:10, but then, what 
> is the best way to
> compute exp(Kt)  and the above matrix product ?
> Up to now, I have worked with  2*2 matrices R and K, so that I compute 
> exp[K(1,1)*t(i)], exp[K(2,2)*t(i) and x(t(i)) within
> a loop, but that doesnot seem very efficient.
> Thanks in advance
> JP Grivet
>


-- 
Adrien Vogt-Schilb (Cired)
Tel: (+33) 1 43 94 *73 77*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20111003/e5bfa22f/attachment.htm>


More information about the users mailing list