Displaying 2 results from an estimated 2 matches for "t_start1".
Did you mean:
t_start
2018 Apr 18
2
Event-triggered change in value with a time-delay
...q(0, 100, length = 101)
# define function
bit <- function(t,y,parms){
with(as.list(c(parms,y)),{
# How I would implement the change if there was no time delay
# m <- ifelse(D>=D_T, m*.68, m)
# Option 1: nested if statements with time delay
# if (D >= D_T) {
# t_start1 <- t + delay
# if (t >= t_start1){
# m <- 6.8
# }
# }
# if (D < D_T) {
# t_start2<- t + delay
# if (t >= t_start2){
# m <- 10
# }
# }
dD <- D_0 * (R_1 / (R_1 - R_2)) * (-R_2 * exp(-R_2 * t) + R_1 *
exp(-R_1 * t)...
2018 Apr 18
0
Event-triggered change in value with a time-delay
...gt; bit <- function(t,y,parms){
> with(as.list(c(parms,y)),{
>
>
> # How I would implement the change if there was no time delay
> # m <- ifelse(D>=D_T, m*.68, m)
>
> # Option 1: nested if statements with time delay
> # if (D >= D_T) {
> # t_start1 <- t + delay
> # if (t >= t_start1){
> # m <- 6.8
> # }
> # }
> # if (D < D_T) {
> # t_start2<- t + delay
> # if (t >= t_start2){
> # m <- 10
> # }
> # }
>
>
> dD <- D_0 * (R_1 / (R_1...