|
5 | 5 | <!-- vim-markdown-toc GFM -->
|
6 | 6 |
|
7 | 7 | * [`trapz` - integrate sampled values using trapezoidal rule](#trapz---integrate-sampled-values-using-trapezoidal-rule)
|
| 8 | + * [Description](#description) |
8 | 9 | * [Syntax](#syntax)
|
9 | 10 | * [Arguments](#arguments)
|
10 | 11 | * [Return value](#return-value)
|
11 | 12 | * [Example](#example)
|
12 | 13 | * [`trapz_weights` - trapezoidal rule weights for given abscissas](#trapz_weights---trapezoidal-rule-weights-for-given-abscissas)
|
| 14 | + * [Description](#description-1) |
13 | 15 | * [Syntax](#syntax-1)
|
14 | 16 | * [Arguments](#arguments-1)
|
15 | 17 | * [Return value](#return-value-1)
|
16 | 18 | * [Example](#example-1)
|
17 | 19 | * [`simps` - integrate sampled values using Simpson's rule (to be implemented)](#simps---integrate-sampled-values-using-simpsons-rule-to-be-implemented)
|
| 20 | + * [Description](#description-2) |
18 | 21 | * [Syntax](#syntax-2)
|
19 | 22 | * [Arguments](#arguments-2)
|
20 | 23 | * [Return value](#return-value-2)
|
21 | 24 | * [Example](#example-2)
|
22 | 25 | * [`simps_weights` - Simpson's rule weights for given abscissas (to be implemented)](#simps_weights---simpsons-rule-weights-for-given-abscissas-to-be-implemented)
|
| 26 | + * [Description](#description-3) |
23 | 27 | * [Syntax](#syntax-3)
|
24 | 28 | * [Arguments](#arguments-3)
|
25 | 29 | * [Return value](#return-value-3)
|
|
29 | 33 |
|
30 | 34 | ## `trapz` - integrate sampled values using trapezoidal rule
|
31 | 35 |
|
| 36 | +### Description |
| 37 | + |
32 | 38 | Returns the trapezoidal rule integral of an array `y` representing discrete samples of a function. The integral is computed assuming either equidistant abscissas with spacing `dx` or arbitary abscissas `x`.
|
33 | 39 |
|
34 | 40 | ### Syntax
|
@@ -68,6 +74,8 @@ end program
|
68 | 74 |
|
69 | 75 | ## `trapz_weights` - trapezoidal rule weights for given abscissas
|
70 | 76 |
|
| 77 | +### Description |
| 78 | + |
71 | 79 | Given an array of abscissas `x`, computes the array of weights `w` such that if `y` represented function values tabulated at `x`, then `sum(w*y)` produces a trapezoidal rule approximation to the integral.
|
72 | 80 |
|
73 | 81 | ### Syntax
|
@@ -102,6 +110,8 @@ end program
|
102 | 110 |
|
103 | 111 | ## `simps` - integrate sampled values using Simpson's rule (to be implemented)
|
104 | 112 |
|
| 113 | +### Description |
| 114 | + |
105 | 115 | Returns the Simpson's rule integral of an array `y` representing discrete samples of a function. The integral is computed assuming either equidistant abscissas with spacing `dx` or arbitary abscissas `x`.
|
106 | 116 |
|
107 | 117 | Simpson's rule is defined for odd-length arrays only. For even-length arrays, an optional argument `even` may be used to specify at which index to replace Simpson's rule with Simpson's 3/8 rule. The 3/8 rule will be used for the array section `y(even:even+4)` and the ordinary Simpon's rule will be used elsewhere.
|
|
136 | 146 |
|
137 | 147 | ## `simps_weights` - Simpson's rule weights for given abscissas (to be implemented)
|
138 | 148 |
|
| 149 | +### Description |
| 150 | + |
139 | 151 | Given an array of abscissas `x`, computes the array of weights `w` such that if `y` represented function values tabulated at `x`, then `sum(w*y)` produces a Simpson's rule approximation to the integral.
|
140 | 152 |
|
141 | 153 | Simpson's rule is defined for odd-length arrays only. For even-length arrays, an optional argument `even` may be used to specify at which index to replace Simpson's rule with Simpson's 3/8 rule. The 3/8 rule will be used for the array section `x(even:even+4)` and the ordinary Simpon's rule will be used elsewhere.
|
|
0 commit comments