help-octave
[Top][All Lists]
Advanced

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

Re: simulating dynamical systems with arbitrary external inputs using ls


From: John W. Eaton
Subject: Re: simulating dynamical systems with arbitrary external inputs using lsode
Date: Fri, 22 Jun 2007 16:52:03 -0400

On 22-Jun-2007, Scott Kuntze wrote:

| function retval = u(t)
|     tvals = some array
|     uvals = some array
|     idx = find(t == tvals)

It's not find that is causing trouble, it is that you are using ==
here.  That can only return a value when T is exactly equal to one of
the values in your TVALS array, which isn't likely to happen.  The
function I posted computes values of U between data points using a
zero order hold.

jwe


reply via email to

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