Message-ID: <51C1994D.6000005@tu-dresden.de>
Date: 2013-06-19T11:43:09Z
From: Thomas Petzoldt
Subject: [R-sig-dyn-mod] deSolve question
In-Reply-To: <1371599185.84369.YahooMailClassic@web140401.mail.bf1.yahoo.com>
Hi Andras,
the / is the division operator and no fraction line, so it does not
imply parentheses.
Here you divide only inp by par$v:
> dy1 <- - pars$k * state[1] + inp/pars$v
but both terms the second:
> #note the added ()
> dy1 <- (- pars$k * state[1] + inp)/pars$v
An equivalent to version 2 would be:
pars$k * state[1]/pars$v + inp/pars$v
ThPe