summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2024-12-21 20:49:12 +0100
committerChristian Kolset <christian.kolset@gmail.com>2024-12-21 20:49:12 +0100
commitf1b305514a9eff23a7d6f75a890fb9ae7e3be0d7 (patch)
tree3c061756334dbd4b2afd3a907eaf551cb490b67b
parent6c7bb93c5e970d442c2bd64a582a5dabd03153e4 (diff)
Fixed bullet points
-rw-r--r--Functions/README.md66
1 files changed, 33 insertions, 33 deletions
diff --git a/Functions/README.md b/Functions/README.md
index 07a3349..8e881b3 100644
--- a/Functions/README.md
+++ b/Functions/README.md
@@ -19,7 +19,7 @@ The syntax of the function is `days(<months>, <days>, <leap>)` where `<months>`
* `leap` - indicates if the year is a leapyear or a regular year. `0` for regular and `1` for leap year.
### Output
-`nd` - number of days elapsed in the year.
+* `nd` - number of days elapsed in the year.
### Example:
`days(8,4,0)` represents August 8th in a regular year (non-leap year).
@@ -31,18 +31,18 @@ Function finds the root of an anonymous function using the false position method
Synopsis: `[root, fx, ea, iter] = falsePosition(func, xl, xu, es, maxit, varargin)`.
### Input
-`func` - the function being evaluated.
-`xl` - lower bound guess.
-`xu` - upper bound guess.
-`es` - desired relative error (default 0.0001%)
-`maxit` - maximum number of iterations (default 200)
-`varargin` - any additional parameters used by the function
+* `func` - the function being evaluated.
+* `xl` - lower bound guess.
+* `xu` - upper bound guess.
+* `es` - desired relative error (default 0.0001%)
+* `maxit` - maximum number of iterations (default 200)
+* `varargin` - any additional parameters used by the function
### Output
-`root` - estimated root location.
-`fx` - function evaluated at root location.
-`ea` - approximated relative error (%).
-`iter` - number of iterations performed.
+* `root` - estimated root location.
+* `fx` - function evaluated at root location.
+* `ea` - approximated relative error (%).
+* `iter` - number of iterations performed.
### Notes:
Known issue: the output of `iter` needs fixing. The output is incorrect.
@@ -54,16 +54,16 @@ Uses the heun method to integrate an ODE.
Synopsis: `[t,y] = Heun(dydt,tspan,y0,h)`.
### Input
-`dydt` -the differential equation of interest (must be anonymous function).
-`tspan` - the initial and final values of the independent variable as a vector with length=2 [ti,tf].
-`y0` - the initial value of the dependent variable.
-`h` - step size.
-`es` - stopping criterion (%), optional (default = 0.001).
-`maxit` - maximum iterations of corrector, optional (default = 50).
+* `dydt` -the differential equation of interest (must be anonymous function).
+* `tspan` - the initial and final values of the independent variable as a vector with length=2 [ti,tf].
+* `y0` - the initial value of the dependent variable.
+* `h` - step size.
+* `es` - stopping criterion (%), optional (default = 0.001).
+* `maxit` - maximum iterations of corrector, optional (default = 50).
### Output
-`t` - vector of independent variable values
-`y` - vector of solution for dependent variable
+* `t` - vector of independent variable values
+* `y` - vector of solution for dependent variable
### Notes:
This function needs some working on to compute a correct solution when using multiple steps with an irregular step size at the end.
@@ -76,12 +76,12 @@ Performs LU decomposition with pivoting.
Synopsis: `[L, U, P] = luFactor(A)`.
### Input
-`A` - a coefficient matrix.
+* `A` - a coefficient matrix.
### Output
-`L` - lower triangular matrix, with 1's along the diagonals.
-`U` - upper triangular matrix.
-`P` - the permutation matrix.
+* `L` - lower triangular matrix, with 1's along the diagonals.
+* `U` - upper triangular matrix.
+* `P` - the permutation matrix.
### Notes:
Be cautious when using this function on bigger matrices. The `L` variable is known to be incorrect.
@@ -93,11 +93,11 @@ Evaluates the integral of two vectors by Simpsons 1/3 rule.
Synopsis: `[I] = Simpson(x, y)`
### Input
-`x` - the vector of equally spaced independent variable.
-`y` - the vector of function values with respect to x.
+* `x` - the vector of equally spaced independent variable.
+* `y` - the vector of function values with respect to x.
### Output
-`I` - numerical calculated integral.
+* `I` - numerical calculated integral.
### Notes:
The current state of this function is **deprecated**. The algorithm fails compute the correct trapeziodal rule given 2 data points as well as 3 data points. Thus, failing to solve real problem. Pull requests are welcomed.
@@ -116,16 +116,16 @@ Function returns a special matrix A with the following criteria:
Synopsis: `[root, fx, ea, iter] = falsePosition(func, xl, xu, es, maxit, varargin)`.
## Input
-`func` - the function being evaluated.
-`xl` - lower bound guess.
-`xu` - upper bound guess.
-`es` - desired relative error (default 0.0001%)
-`maxit` - maximum number of iterations (default 200)
-`varargin` - any additional parameters used by the function
+* `func` - the function being evaluated.
+* `xl` - lower bound guess.
+* `xu` - upper bound guess.
+* `es` - desired relative error (default 0.0001%)
+* `maxit` - maximum number of iterations (default 200)
+* `varargin` - any additional parameters used by the function
## Output
-`A` - special matrix with the appropriate rules
+* `A` - special matrix with the appropriate rules
## Notes:
This function has not much of a practical application, rather a very good exercise for beginners to get started with the basics of matrix manipulation and user-defined functions.