typos
This commit is contained in:
parent
92f4cba496
commit
33c02f08ce
@ -1,4 +1,4 @@
|
||||
version: "0.24"
|
||||
version: "0.23"
|
||||
engine: julia
|
||||
|
||||
project:
|
||||
|
@ -661,7 +661,7 @@ We can see the derivative again reflects the chain rule, it being given by `1/x
|
||||
The curvature of a function will be a topic in a later section on differentiable vector calculus, but the concept of linearization can be used to give an earlier introduction.
|
||||
|
||||
|
||||
The tangent line linearizes the function, it begin the best linear approximation to the graph of the function at the point. The slope of the tangent line is the limi of the slopes of different secant lines. Consdider now, the orthogonal concept, the *normal line* at a point. This is a line perpendicular to the tangent line that goes through the point on the curve.
|
||||
The tangent line linearizes the function, it begin the best linear approximation to the graph of the function at the point. The slope of the tangent line is the limi of the slopes of different secant lines. Consider now, the orthogonal concept, the *normal line* at a point. This is a line perpendicular to the tangent line that goes through the point on the curve.
|
||||
|
||||
At a point $(c,f(c))$ the slope of the normal line is $-1/f'(c)$.
|
||||
|
||||
|
@ -237,7 +237,7 @@ x1 + x2 + x3 + x4 + x5 + x6
|
||||
|
||||
Someone doesn't need to know `Julia`'s syntax to guess what this computes, save for the idiosyncratic tuple assignment used, which could have been bypassed at the cost of even more typing.
|
||||
|
||||
A more efficient means to do, as each componenent isn't named, this would be to store the data in a container:
|
||||
A more efficient means to do, as each component isn't named, this would be to store the data in a container:
|
||||
|
||||
```{julia}
|
||||
xs = [1, 2, 3, 4, 5, 6] # as a vector
|
||||
@ -275,7 +275,7 @@ reduce(*, xs; init=1) # prod(xs)
|
||||
|
||||
The functions (`+` and `*`) are binary operators and are serially passed the running value (or `init`) and the new term from the iterator.
|
||||
|
||||
The initial value above is the unit for the operation (which could be found programatically by `zero(eltype(xs))` or `one(eltype(xs))` where the type is useful for better performance).
|
||||
The initial value above is the unit for the operation (which could be found programmatically by `zero(eltype(xs))` or `one(eltype(xs))` where the type is useful for better performance).
|
||||
|
||||
The `foldl` and `foldr` functions are similar to `reduce` only left (and right) associativity is guaranteed. This example uses the binary, infix `Pair` operator, `=>`, to illustrate the difference:
|
||||
|
||||
@ -289,7 +289,7 @@ and
|
||||
foldr(=>, xs)
|
||||
```
|
||||
|
||||
Next, we do a slighlty more complicated problem.
|
||||
Next, we do a slightly more complicated problem.
|
||||
|
||||
Recall the distance formula between two points, also called the *norm*. It is written here with the square root on the other side: $d^2 = (x_1-y_1)^2 + (x_0 - y_0)^2$. This computation can be usefully generalized to higher dimensional points (with $n$ components each).
|
||||
|
||||
@ -303,7 +303,7 @@ sum((xs - ys).^2)
|
||||
```
|
||||
|
||||
|
||||
This formula is a sum after applying an operation to the paired off values. Using a geneator that sum would look like:
|
||||
This formula is a sum after applying an operation to the paired off values. Using a generator that sum would look like:
|
||||
|
||||
```{julia}
|
||||
sum((xi - yi)^2 for (xi, yi) in zip(xs, ys))
|
||||
@ -366,7 +366,7 @@ bs
|
||||
```
|
||||
|
||||
|
||||
The `bs` are represented with an iterator and can be collected to yield the values, though often this is unecessary and possibly a costly step:
|
||||
The `bs` are represented with an iterator and can be collected to yield the values, though often this is unnecessary and possibly a costly step:
|
||||
|
||||
```{julia}
|
||||
collect(bs), sum(bs)
|
||||
|
@ -526,7 +526,7 @@ quadgk(y -> f(y) - g(y), a, b)[1]
|
||||
|
||||
## The area enclosed in a simple polygon
|
||||
|
||||
A simple polygon is comprised of several non-intersecting line segments, save for the last segment ends where the first begins. These have an orientation, which we take to be counterclockwise. Polygons, as was seen when computing areas related to Archimedes efforts, can be partioned into simple geometric shapes, for which known areas apply.
|
||||
A simple polygon is comprised of several non-intersecting line segments, save for the last segment ends where the first begins. These have an orientation, which we take to be counterclockwise. Polygons, as was seen when computing areas related to Archimedes efforts, can be partitioned into simple geometric shapes, for which known areas apply.
|
||||
|
||||
### The trapezoid formula
|
||||
|
||||
|
@ -162,7 +162,7 @@ caption = L"""
|
||||
|
||||
Illustration of the bisection method to find a zero of a function. At
|
||||
each step the interval has $f(a)$ and $f(b)$ having opposite signs so
|
||||
that the intermediate value theorem guaratees a zero.
|
||||
that the intermediate value theorem guarantees a zero.
|
||||
|
||||
"""
|
||||
|
||||
|
@ -280,7 +280,7 @@ Values will be promoted to a common type (or type `Any` if none exists). For exa
|
||||
(Vectors are used as a return type from some functions, as such, some familiarity is needed.)
|
||||
|
||||
|
||||
Other common container types are variations of vectors (higher-dimensional arrarys, offset arrays, etc.) tuples (for heterogeneous, immutable, indexed values); named tuples (which add a name to each value in a tuple); and dictionaries (for associative relationships between a key and a value).
|
||||
Other common container types are variations of vectors (higher-dimensional arrays, offset arrays, etc.) tuples (for heterogeneous, immutable, indexed values); named tuples (which add a name to each value in a tuple); and dictionaries (for associative relationships between a key and a value).
|
||||
|
||||
|
||||
Regular arithmetic sequences can be defined by either:
|
||||
|
@ -492,7 +492,7 @@ For plotting points with `scatter`, or `scatter!` the markers can be adjusted vi
|
||||
|
||||
Of course, zero, one, or more of these can be used on any given call to `plot`, `plot!`, `scatter`, or `scatter!`.
|
||||
|
||||
There are also several *shorthands* in `Plots` that allows several related attributes to be specified to a single argument that is disambiguated using the type of the value. (Eg. `line=(5, 0.25, "blue")` will specify the line have widht `5`, color `blue`, and alpha-transparency `0.25`.)
|
||||
There are also several *shorthands* in `Plots` that allows several related attributes to be specified to a single argument that is disambiguated using the type of the value. (Eg. `line=(5, 0.25, "blue")` will specify the line have width `5`, color `blue`, and alpha-transparency `0.25`.)
|
||||
|
||||
#### Example: Bresenham's algorithm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user