help-octave
[Top][All Lists]
Advanced

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

Re: Non homogeneous differential equations


From: François Poulain
Subject: Re: Non homogeneous differential equations
Date: Tue, 22 May 2007 21:18:08 +0200

Ok, thank you ... I just seen that I am using GNU Octave, version
2.1.73, whereas you are at the version 2.9.11 ...
I am surprised ! I am using gentoo in unstable mode, and I am not used
to get old software ... I 'll repair this, and retry this code.

Thank you for all.

François

Le mardi 22 mai 2007 à 15:00 -0400, John W. Eaton a écrit :
> On 22-May-2007, François Poulain wrote:
> 
> | Thank you for your help, but it doesn't work in octave : you can see the
> | computation below. I already tried some things like that, and I didn't
> | find any way to solve this problem ...
> | 
> | octave:1> function xdot = f (x, t, uf, tauf)
> | >   persistent a = 1
> | >   persistent b = 1
> | >   u = uf (t);
> | >   xdot = [-a*x(4)*sin(x(3))+u(1);
> | >           -a*x(4)*cos(x(3))+u(2);
> | >           -x(4)+u(3);
> | >           b*(x(1)*sin(x(3))+x(2)*cos(x(3)))-tauf(t)];
> | > endfunction
> | octave:2>  t = linspace (0, 1, 101);
> | octave:3>  x = lsode (@ (x, t) f (x, t, @ (t) t.^((0:2)'), @sin), zeros
> | (4, 1),t);
> | error: lsode: first arg should be a string or 2-element string array
> | error: evaluating assignment expression near line 3, column 4
> 
> Newer versions of Octave will handle this.
> 
> jwe
-- 
François Poulain <address@hidden>



reply via email to

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