Learn R Programming

kader (version 0.0.8)

qc: qc

Description

Coefficient \(q_c(u)\) of eq. (15.15) in Eichner (2017).

Usage

qc(u, cc = sqrt(5/3))

Arguments

u

Numeric vector.

cc

Numeric constant, defaults to \(\sqrt(5/3)\).

Value

Vector of same length and mode as u.

Details

\(q_c(u) = 2/5 * c^5 / (3 - c^2) * (1 - 2 * u)\)

For further details see p. 297 f. in Eichner (2017) and/or Eichner & Stute (2013).

Examples

Run this code
# NOT RUN {
u <- c(0, 1)   # seq(0, 1, by = 0.1)
c0 <- expression(sqrt(5/3))
c1 <- expression(sqrt(3) - 0.05)
cgrid <- seq(1.4, 1.6, by = 0.1)
cvals <- c(eval(c0), cgrid, eval(c1))

Y <- sapply(cvals, function(cc, u) qc(u, cc = cc), u = u)
cols <- rainbow(ncol(Y), end = 9/12)
matplot(u, Y, type = "l", lty = "solid", col = cols,
  ylab = expression(q[c](u)))
abline(h = 0, lty = "dashed")
legend("topright", title = "c", legend = c(c0, cgrid, c1),
  lty = 1, col = cols, cex = 0.8)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab