I tried the sigmoidal and tanh model, they both worked.
Thanks a lot.



On Mon, Jun 24, 2013 at 5:25 PM, Thomas Petzoldt <
Thomas.Petzoldt@tu-dresden.de> wrote:

> Try the following instead of the if block:
>
>   K12 <- K12 * (1 + tanh(1e3 * (S1/V1 - 0.2))) / 2
>
>
> where the "1e3" determines steepness of the transition:
>
>
> x <- seq(0, 0.4, 1e-4)
> plot(x, (1 + tanh(1e3*(x - 0.2)))/2, type = "l", col = "red")
> abline(v = 0.2)
>
>
> As a positive side effect, smooth transition (instead of "if") makes the
> model faster.
>
> ThPe
>
>
> ______________________________**_________________
> R-sig-dynamic-models mailing list
> R-sig-dynamic-models@r-**project.org <R-sig-dynamic-models@r-project.org>
> https://stat.ethz.ch/mailman/**listinfo/r-sig-dynamic-models<https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models>
>

	[[alternative HTML version deleted]]

