help-octave
[Top][All Lists]
Advanced

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

Re: adding pulse in lsode function


From: Juan Pablo Carbajal
Subject: Re: adding pulse in lsode function
Date: Sat, 22 Mar 2014 14:27:53 +0100

On Fri, Mar 21, 2014 at 5:03 PM, shm <address@hidden> wrote:
> How to add a pulse in lsode function of octave? I want to change drug dose
> with respect to time, while calculating drug dosage in a differential
> equation, which is then called by lsode in another file.
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/adding-pulse-in-lsode-function-tp4663242.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

If the equations are linear, you can do impulse response and do not
need to solve the system explicitly (check control package).
If the equations are nonlinear you can see if your pulse can be
rendered as a discrete switch of the conditions of the system, Then
you can integrate to t_critic (time of the impulse), change your state
vector and then integrate from those initial conditions. You can do
this also with solvers in odepkg, using event functions.

You can also use narrow input functions (strictly, not pulses) and
study the response your system, the narrow functions can be, for
example, Gaussians with decreasing standard deviation and increasing
maximum value. Note that the narrower your input function the smaller
the time step needed (even locally) and the more time you will have to
wait to get a solution. This is easy to do but can be costly in terms
of time waiting before getting results. Also, you have to be careful
with the maximum time step for narrow functions, cause the integration
may miss a pulse if it is narrower than the maximum time step.


reply via email to

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