From b60937ccf6c90a288395e9f8fb28efc9b6f824ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Thelander=20Andr=C3=A9n?= <marcus.thelander_andren@control.lth.se> Date: Fri, 22 Sep 2017 10:53:43 +0200 Subject: [PATCH] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 5f3fedf..e9b279e 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,21 @@ The input arguments of `optimal_bound_2D` are: * `plot_progress` : Specifies if $`V`$ and $`\partial \Omega`$ should be plotted during the simulation (`plot_progress = 1`) or not (`plot_progress = 0`). * `print_progress` : Specifies if iteration info should be printed to the command window during the simulation (`print_progress = 1`) or not (`print_progress = 0`). +The output argument `V` is a matrix with dimensions compatible with `x1vec`and `x2vec`. For instance, you can call `surf(x1vec, x2vec, V)` to generate a surface plot of $`V`$, or +`contour(x1vec, x2vec, V, [0 0])` to plot the bound $`\partial \Omega`$. + +## Plotting during Simulation +With the input argument `plot_progress = 1`, a surface plot of $`V`$ and a plot of $`\partial \Omega`$ will be updated every 10th iteration of the simulation. + + +## Printing during Simulation +With the input argument `print_progress = 1`, information of every 10th iteration will be printed to the command window during the simulation. An example is shown below: + +```matlab +Iterations : 10 out of 50000 | Maximum Vdiff = 0.00049488 | V(0) = -0.0049714 +``` +The printout displays the current iteration number (in this case 10) out of the maximum number of iterations (50000). The `Maximum Vdiff` value is the largest absolute value between the current and last iteration +$`V`$, and is the basis for determining when stationarity is reached. The value $`V(0)`$ is the current value of $`V`$ at the origin. It is linked to the per-sample cost $`\rho`$, as $`V(0) = -\rho`$ (see the [article](cdc2017_paper.pdf)). # About the Numerical Method The numerical solution method is based on simulating the non-stationary version of the PDE using finite-difference approximations of the differential operators and gridding in time and space. In this implementation, we use the backward-time central-space (BTCS) finite-difference approximation (see e.g. this [article](http://depa.fquim.unam.mx/amyd/archivero/DiferenciasFinitas4_25730.pdf) for more details). -- GitLab