From fb6eeb1ba4661031ae7c7f4babdcc607534f7702 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 18 Dec 2023 10:32:56 -0500 Subject: [PATCH] Fix printing in some of the docs --- docs/src/basics/Logging.md | 1 + docs/src/tutorials/optimizing_parameterized_ode.md | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/src/basics/Logging.md b/docs/src/basics/Logging.md index 30f579538..edd191d76 100644 --- a/docs/src/basics/Logging.md +++ b/docs/src/basics/Logging.md @@ -39,6 +39,7 @@ the trace to see what is happening: ```@example tracing solve(prob; show_trace = Val(true), trace_level = TraceAll(10)) +nothing; # hide ``` You can also store the trace in the solution object: diff --git a/docs/src/tutorials/optimizing_parameterized_ode.md b/docs/src/tutorials/optimizing_parameterized_ode.md index 44ba65eb5..6a0740939 100644 --- a/docs/src/tutorials/optimizing_parameterized_ode.md +++ b/docs/src/tutorials/optimizing_parameterized_ode.md @@ -55,6 +55,11 @@ Now, we can use any NLLS solver to solve this problem. ```@example parameterized_ode res = solve(nlls_prob, LevenbergMarquardt(); maxiters = 1000, show_trace = Val(true), trace_level = TraceAll()) +nothing # hide +``` + +```@example parameterized_ode +res ``` We can also use Trust Region methods. @@ -62,6 +67,11 @@ We can also use Trust Region methods. ```@example parameterized_ode res = solve(nlls_prob, TrustRegion(); maxiters = 1000, show_trace = Val(true), trace_level = TraceAll()) +nothing # hide +``` + +```@example parameterized_ode +res ``` Let's plot the solution. @@ -72,5 +82,4 @@ sol_fit = solve(prob2, Tsit5(); p = res.u) sol_true = solve(prob2, Tsit5(); p = p) plot(sol_true; linewidth = 3) plot!(sol_fit; linewidth = 3, linestyle = :dash) -savefig("LV_ode_fit.png") ```