diff --git a/docs/src/basics/SampledIntegralProblem.md b/docs/src/basics/SampledIntegralProblem.md index b4520d06..9f92e3f2 100644 --- a/docs/src/basics/SampledIntegralProblem.md +++ b/docs/src/basics/SampledIntegralProblem.md @@ -9,7 +9,7 @@ for doing that. Say, by some means we have generated a dataset `x` and `y`: -```example 1 +```@example 1 using Integrals # hide f = x -> x^2 x = range(0, 1, length=20) @@ -18,7 +18,7 @@ y = f.(x) Now, we can integrate this data set as follows: -```example 1 +```@example 1 problem = SampledIntegralProblem(y, x) method = TrapezoidalRule() solve(problem, method) @@ -37,7 +37,7 @@ non-uniform grids. Example: -```example 2 +```@example 2 using Integrals # hide f = x -> x^7 x = [0.0; sort(rand(1000)); 1.0] @@ -53,7 +53,7 @@ If the provided data set `y` is a multidimensional array, the integrals are eval of its axes. For performance reasons, the last axis of the array `y` is chosen by default, but this can be modified with the `dim` keyword argument to the problem definition. -```example 3 +```@example 3 using Integrals # hide f1 = x -> x^2 f2 = x -> x^3 diff --git a/src/algorithms.jl b/src/algorithms.jl index f2c1dfc5..6812bf1c 100644 --- a/src/algorithms.jl +++ b/src/algorithms.jl @@ -141,7 +141,7 @@ f = x -> x^2 x = range(0, 1, length=20) y = f.(x) problem = SampledIntegralProblem(y, x) -method = TrapezoidalRul() +method = TrapezoidalRule() solve(problem, method) ``` """