From 0324bc7752fb6ae2b66dc73431f3944f2aba9d91 Mon Sep 17 00:00:00 2001 From: Matthieu Gomez Date: Wed, 12 Jun 2024 13:20:30 -0400 Subject: [PATCH] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8cf0c9f..97c8bb9 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ feynman_kac(MX; t = range(0, 100, step = 1/12), f = zeros(length(x)), ψ = ones # Derivative -The package allows you to compute (lazyly) the first and second derivatives on a grid through finite difference schemes +The package also allows you to compute (lazy) first and second derivatives of a function on a grid using a finite difference schemes -``` +```julia using InfinitesimalGenerators x = range(-1, 1, length = 100) f = sin.(x) -FirstDerivative(x, sin, direction = :upward, bc = (0, 0)) -FirstDerivative(x, sin, direction = :downward, bc = (0, 0)) -SecondDerivative(x, sin, bc = (0, 0)) +FirstDerivative(x, f, direction = :upward, bc = (0, 0)) +FirstDerivative(x, f, direction = :downward, bc = (0, 0)) +SecondDerivative(x, f, bc = (0, 0)) ``` The argument `bc` refers to the value of the first-derivative at the limit