deltaV | R Documentation |
Approximate potential difference between two points
deltaV(f, x, x0, normType = "f")
f |
Flow equations (right hand side of differential equation) |
x |
Position where we want to know the approximate potential |
x0 |
Reference position (center of the Taylor expansion) |
normType |
(default: 'f') Matrix norm used to compute the error |
A list containing the approximate potential difference between x and x0 and the estimated error
Pablo Rodríguez-Sánchez (https://pabrod.github.io)
https://doi.org/10.1371/journal.pcbi.1007788
approxPot1D, approxPot2D, norm
# One dimensional flow
f <- function(x) { cos(x) }
# Evaluation points
x0 <- 1
x1 <- 1.02
dV <- deltaV(f, x1, x0)
# Two dimensional flow
f <- function(x) { c(
-2*x[1]*x[2],
-x[1]^2 - 1
)}
# Evaluation points
x0 <- matrix(c(1,2), ncol = 1)
x1 <- matrix(c(0.98,2.01), ncol = 1)
dV <- deltaV(f, x1, x0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.