help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linear Solution Question


From: DrakeGis
Subject: Linear Solution Question
Date: Wed, 3 Mar 2004 10:45:06 -0500 (EST)
User-agent: SquirrelMail/1.4.2

Hi,
  I'm solving a Linear ODE System, let say

  dU/dt = A * u(t)


and I have all the data in order to make it analytically,so in order to
know the solution at time t=1, I type...

t = 1;
A = [-1, 1;0,-2];
init = [0.5 ; sqrt(3)/2];
[S, D]=eig(A);
S*expm(D*t)*inv(S)*init

ans =

  0.38533
  0.11720

But If I want to "simulate" the system, I must calculate the solution at
each time... so for tiem t=1, I do

A*init

ans =

   0.36603
  -1.73205

Quite Diferent !!! Do you know what's wrong here ??

Thanks in Advance

  D.



-----------------------------------------
This email was sent using DACafeMail.
Get Your 10 MB eMail Account Now.
http://cafemail.edacafe.com



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]