update vectors
some typos.
This commit is contained in:
parent
cca802932c
commit
52f3d7dce2
@ -177,7 +177,7 @@ plot(unzip(h.(ts))...)
|
||||
### The `plot_parametric` function
|
||||
|
||||
|
||||
While the `unzip` function is easy to understand as a function that reshapes data from one format into one that `plot` can use, it's usage is a bit cumbersome. The `CalculusWithJulia` package provides a function `plot_parametric` which hides the use of `unzip` and the splatting within a function definition.
|
||||
While the `unzip` function is easy to understand as a function that reshapes data from one format into one that `plot` can use, its usage is a bit cumbersome. The `CalculusWithJulia` package provides a function `plot_parametric` which hides the use of `unzip` and the splatting within a function definition.
|
||||
|
||||
|
||||
The function borrows a calling style for `Makie`. The interval to plot over is specified first using `a..b` notation (which specifies a closed interval in the `IntervalSets` package), then the function is specified. Additional keyword arguments are passed along to `plot`.
|
||||
@ -415,7 +415,7 @@ A passenger sits on a circular platform with radius $r$ attached at some point o
|
||||
|
||||
|
||||
$$
|
||||
\vec{v}(t) = \langle r \sin(2\pi t/S), r \sin(2\pi t/S), 0 \rangle.
|
||||
\vec{v}(t) = \langle r \sin(2\pi t/S), r \cos(2\pi t/S), 0 \rangle.
|
||||
$$
|
||||
|
||||
And the motion relative to the origin would be the vector sum, or superposition:
|
||||
@ -451,7 +451,7 @@ If the notion of "$\vec{f}$ is close to $L$" is replaced by close in the sense
|
||||
The notion of continuity is identical: $\vec{f}(t)$ is continuous at $t_0$ if $\lim_{t \rightarrow t_0}\vec{f}(t) = \vec{f}(t_0)$. More informally $\| \vec{f}(t) - \vec{f}(t_0)\| \rightarrow 0$.
|
||||
|
||||
|
||||
A consequence of the triangle inequality is that a vector-valued function is continuous or has a limit if and only it its component functions do.
|
||||
A consequence of the triangle inequality is that a vector-valued function is continuous or has a limit if and only if its component functions do.
|
||||
|
||||
|
||||
### Derivatives
|
||||
@ -616,7 +616,7 @@ nothing
|
||||
##### Example: a tractrix
|
||||
|
||||
|
||||
A [tractrix](https://en.wikipedia.org/wiki/Tractrix), studied by Perrault, Newton, Huygens, and many others, is the curve along which an object moves when pulled in a horizontal plane by a line segment attached to a pulling point (Wikipedia). If the object is placed at $(a,0)$ and the puller at the origin, and the puller moves along the positive $x$ axis, then the line will always be tangent to the curve and of fixed length, so determinable from the motion of the puller. In this example $dy/dx = -\sqrt{a^2-x^2}/x$.
|
||||
A [tractrix](https://en.wikipedia.org/wiki/Tractrix), studied by Perrault, Newton, Huygens, and many others, is the curve along which an object moves when pulled in a horizontal plane by a line segment attached to a pulling point (Wikipedia). If the object is placed at $(a,0)$ and the puller at the origin, and the puller moves along the positive $y$ axis, then the line will always be tangent to the curve and of fixed length, so determinable from the motion of the puller. In this example $dy/dx = -\sqrt{a^2-x^2}/x$.
|
||||
|
||||
|
||||
This is the key property: "Due to the geometrical way it was defined, the tractrix has the property that the segment of its tangent, between the asymptote and the point of tangency, has constant length $a$."
|
||||
@ -804,7 +804,7 @@ For the dot product, the combination $\vec{f}(t) \cdot \vec{g}(t)$ we have a uni
|
||||
\end{align*}
|
||||
|
||||
|
||||
Suggesting the that a product rule like formula applies for dot products.
|
||||
Suggesting that a product rule like formula applies for dot products.
|
||||
|
||||
|
||||
For the cross product, we let `SymPy` derive a formula for us.
|
||||
@ -967,7 +967,7 @@ $$
|
||||
\vec{v} \times \vec{c} = GM \hat{x} + \vec{d}.
|
||||
$$
|
||||
|
||||
As $\vec{u}$ and $\vec{v}\times\vec{c}$ lie in the same plane - orthogonal to $\vec{c}$ - so does $\vec{d}$. With a suitable re-orientation, so that $\vec{d}$ is along the $x$ axis, $\vec{c}$ is along the $z$-axis, then we have $\vec{c} = \langle 0,0,c\rangle$ and $\vec{d} = \langle d ,0,0 \rangle$, and $\vec{x} = \langle x, y, 0 \rangle$. Set $\theta$ to be the angle, then $\hat{x} = \langle \cos(\theta), \sin(\theta), 0\rangle$.
|
||||
As $\vec{x}$ and $\vec{v}\times\vec{c}$ lie in the same plane - orthogonal to $\vec{c}$ - so does $\vec{d}$. With a suitable re-orientation, so that $\vec{d}$ is along the $x$ axis, $\vec{c}$ is along the $z$-axis, then we have $\vec{c} = \langle 0,0,c\rangle$ and $\vec{d} = \langle d ,0,0 \rangle$, and $\vec{x} = \langle x, y, 0 \rangle$. Set $\theta$ to be the angle, then $\hat{x} = \langle \cos(\theta), \sin(\theta), 0\rangle$.
|
||||
|
||||
|
||||
Now
|
||||
@ -1012,7 +1012,7 @@ arrow!([0,0], x1(t0)); arrow!([0,0], x1(t0 + Delta))
|
||||
arrow!(x1(t0), x1(t0+Delta)- x1(t0), linewidth=5)
|
||||
```
|
||||
|
||||
The area swept out, is basically the half the area of the parallelogram formed by $\vec{x}(t)$ and $\Delta \vec{x}(t) = \vec{x}(t + \Delta t) - \vec{x}(t))$. This area is $(1/2) (\vec{x} \times \Delta\vec{x}(t))$.
|
||||
The area swept out, is basically the half the area of the parallelogram formed by $\vec{x}(t)$ and $\Delta \vec{x}(t) = \vec{x}(t + \Delta t) - \vec{x}(t)$. This area is $(1/2) (\vec{x} \times \Delta\vec{x}(t))$.
|
||||
|
||||
|
||||
If we divide through by $\Delta t$, and take a limit we have:
|
||||
@ -1392,7 +1392,7 @@ In [Arc length](../integrals/arc_length.html) there is a discussion of how to fi
|
||||
If we associate $\vec{r}'(t)$ with the velocity, then this is the integral of the speed (the magnitude of the velocity).
|
||||
|
||||
|
||||
Let $I=[a,b]$ and $s(t): [v,w] \rightarrow [a,b]$ such that $s$ is increasing and differentiable. Then $\vec{\phi} = \vec{r} \circ s$ will have have
|
||||
Let $I=[a,b]$ and $s(t): [v,w] \rightarrow [a,b]$ such that $s$ is increasing and differentiable. Then $\vec{\phi} = \vec{r} \circ s$ will have
|
||||
|
||||
|
||||
$$
|
||||
@ -1495,7 +1495,7 @@ Parameterizing by arc-length is only explicitly possible for a few examples, how
|
||||
|
||||
|
||||
$$
|
||||
\hat{T}(s)= \vec{r}'(s) / \| \vec{r}'(s) \| = \vec{r}'(s),\quad
|
||||
\hat{T}(s)= \vec{r}'(s) / \| \vec{r}'(s) \| = \hat{r}'(s),\quad
|
||||
\hat{N}(s) = \hat{T}'(s) / \| \hat{T}'(s)\| = \hat{T}'(s)/\kappa,\quad
|
||||
\hat{B} = \hat{T} \times \hat{N},
|
||||
$$
|
||||
@ -1579,7 +1579,7 @@ Here, when $b$ gets large, the curve looks more and more "straight" and the tors
|
||||
##### Example
|
||||
|
||||
|
||||
[Levi and Tabachnikov](https://projecteuclid.org/download/pdf_1/euclid.em/1259158427) consider the trajectories of the front and rear bicycle wheels. Recall the notation previously used: $\vec{F}(t)$ for the front wheel, and $\vec{B}(t)$ for the rear wheel trajectories. Consider now their parameterization by arc length, using $u$ for the arc-length parameter for $\vec{F}$ and $v$ for $\vec{B}$. We define $\alpha(u)$ to be the steering angle of the bicycle. This can be found as the angle between the tangent vector of the path of $\vec{F}$ with the vector $\vec{B} - \vec{F}$. Let $\kappa$ be the curvature of the front wheel and $k$ the curvature of the back wheel.
|
||||
[Levi and Tabachnikov](https://projecteuclid.org/download/pdf_1/euclid.em/1259158427) consider the trajectories of the front and rear bicycle wheels. Recall the notation previously used: $\vec{F}(t)$ for the front wheel, and $\vec{B}(t)$ for the rear wheel trajectories. Consider now their parameterization by arc length, using $u$ for the arc-length parameter for $\vec{F}$ and $v$ for $\vec{B}$. We define $\alpha(u)$ to be the steering angle of the bicycle. This can be found as the angle between the tangent vector of the path of $\vec{F}$ with the vector $\vec{F} - \vec{B}$. Let $\kappa$ be the curvature of the front wheel and $k$ the curvature of the back wheel.
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -1623,7 +1623,7 @@ Levi and Tabachnikov prove in their Proposition 2.4:
|
||||
|
||||
\begin{align*}
|
||||
\kappa(u) &= \frac{d\alpha(u)}{du} + \frac{\sin(\alpha(u))}{a},\\
|
||||
|\frac{du}{dv}| &= |\cos(\alpha)|, \quad \text{and}\\
|
||||
|\frac{dv}{du}| &= |\cos(\alpha)|, \quad \text{and}\\
|
||||
k &= \frac{\tan(\alpha)}{a}.
|
||||
\end{align*}
|
||||
|
||||
@ -1659,32 +1659,32 @@ The key decomposition, is to express a unit vector in the direction of the line
|
||||
|
||||
|
||||
$$
|
||||
\langle \cos(\alpha) \vec{U}_1 - \sin(\alpha) \vec{U}_2,
|
||||
\sin(\alpha) \vec{U}_1 + \cos(\alpha) \vec{U}_2 =
|
||||
\vec{U} \cos(\alpha) - \vec{V} \sin(\alpha).
|
||||
\langle \cos(\alpha) \vec{U}_1 + \sin(\alpha) \vec{U}_2,
|
||||
-\sin(\alpha) \vec{U}_1 + \cos(\alpha) \vec{U}_2 \rangle =
|
||||
\vec{U} \cos(\alpha) + \vec{V} \sin(\alpha).
|
||||
$$
|
||||
|
||||
With this, the mathematical relationship between $F$ and $B$ is just a multiple of this unit vector:
|
||||
|
||||
|
||||
$$
|
||||
\vec{B}(u) = \vec{F}(u) - a \vec{U} \cos(\alpha) + a \vec{V} \sin(\alpha).
|
||||
\vec{B}(u) = \vec{F}(u) - a \vec{U} \cos(\alpha) - a \vec{V} \sin(\alpha).
|
||||
$$
|
||||
|
||||
It must be that the tangent line of $\vec{B}$ is parallel to $\vec{U} \cos(\alpha) + \vec{V} \sin(\alpha)$. To utilize this, we differentiate $\vec{B}$ using the facts that $\vec{U}' = \kappa \vec{V}$ and $\vec{V}' = -\kappa \vec{U}$. These coming from $\vec{U} = \vec{F}'$ and so it's derivative in $u$ has magnitude yielding the curvature, $\kappa$, and direction orthogonal to $\vec{U}$.
|
||||
It must be that the tangent line of $\vec{B}$ is parallel to $\vec{U} \cos(\alpha) + \vec{V} \sin(\alpha)$. To utilize this, we differentiate $\vec{B}$ using the facts that $\vec{U}' = -\kappa \vec{V}$ and $\vec{V}' = \kappa \vec{U}$. These coming from $\vec{U} = \vec{F}'$ and so it's derivative in $u$ has magnitude yielding the curvature, $\kappa$, and direction orthogonal to $\vec{U}$.
|
||||
|
||||
|
||||
|
||||
\begin{align*}
|
||||
\vec{B}'(u) &= \vec{F}'(u)
|
||||
-a \vec{U}' \cos(\alpha) -a \vec{U} (-\sin(\alpha)) \alpha'
|
||||
+a \vec{V}' \sin(\alpha) + a \vec{V} \cos(\alpha) \alpha'\\
|
||||
-a \vec{V}' \sin(\alpha) - a \vec{V} \cos(\alpha) \alpha'\\
|
||||
& = \vec{U}
|
||||
-a (\kappa) \vec{V} \cos(\alpha) + a \vec{U} \sin(\alpha) \alpha' +
|
||||
a (-\kappa) \vec{U} \sin(\alpha) + a \vec{V} \cos(\alpha) \alpha' \\
|
||||
+a (\kappa) \vec{V} \cos(\alpha) + a \vec{U} \sin(\alpha) \alpha' -
|
||||
a (\kappa) \vec{U} \sin(\alpha) - a \vec{V} \cos(\alpha) \alpha' \\
|
||||
&= \vec{U}
|
||||
+ a(\alpha' - \kappa) \sin(\alpha) \vec{U}
|
||||
+ a(\alpha' - \kappa) \cos(\alpha)\vec{V}.
|
||||
- a(\alpha' - \kappa) \cos(\alpha)\vec{V}.
|
||||
\end{align*}
|
||||
|
||||
|
||||
@ -1696,9 +1696,9 @@ Extend the $2$-dimensional vectors to $3$ dimensions, by adding a zero $z$ compo
|
||||
\vec{0} &= (\vec{U}
|
||||
+ a(\alpha' - \kappa) \sin(\alpha) \vec{U}
|
||||
+ a(\alpha' - \kappa) \cos(\alpha)\vec{V}) \times
|
||||
(-\vec{U} \cos(\alpha) + \vec{V} \sin(\alpha)) \\
|
||||
(\vec{U} \cos(\alpha) + \vec{V} \sin(\alpha)) \\
|
||||
&= (\vec{U} \times \vec{V}) \sin(\alpha) +
|
||||
a(\alpha' - \kappa) \sin(\alpha) \vec{U} \times \vec{V} \sin(\alpha)) -
|
||||
a(\alpha' - \kappa) \sin(\alpha) \vec{U} \times \vec{V} \sin(\alpha) -
|
||||
a(\alpha' - \kappa) \cos(\alpha)\vec{V} \times \vec{U} \cos(\alpha) \\
|
||||
&= (\sin(\alpha) + a(\alpha'-\kappa) \sin^2(\alpha) +
|
||||
a(\alpha'-\kappa) \cos^2(\alpha)) \vec{U} \times \vec{V} \\
|
||||
@ -1719,8 +1719,8 @@ As for the second equation, from the expression for $\vec{B}'(u)$, after setting
|
||||
|
||||
\begin{align*}
|
||||
\|\vec{B}'(u)\|^2
|
||||
&= \| (1 -\sin(\alpha)\sin(\alpha)) \vec{U} -\sin(\alpha)\cos(\alpha) \vec{V} \|^2\\
|
||||
&= \| \cos^2(\alpha) \vec{U} -\sin(\alpha)\cos(\alpha) \vec{V} \|^2\\
|
||||
&= \| (1 -\sin(\alpha)\sin(\alpha)) \vec{U} +\sin(\alpha)\cos(\alpha) \vec{V} \|^2\\
|
||||
&= \| \cos^2(\alpha) \vec{U} +\sin(\alpha)\cos(\alpha) \vec{V} \|^2\\
|
||||
&= (\cos^2(\alpha))^2 + (\sin(\alpha)\cos(\alpha))^2\quad\text{using } \vec{U}\cdot\vec{V}=0\\
|
||||
&= \cos^2(\alpha)(\cos^2(\alpha) + \sin^2(\alpha))\\
|
||||
&= \cos^2(\alpha).
|
||||
@ -1764,7 +1764,7 @@ Consider two nearby points $t$ and $t+\epsilon$ and the intersection of $l_t$ an
|
||||
|
||||
\begin{align*}
|
||||
u(t) - av'(t) &= u(t+\epsilon) - bv'(t+\epsilon) \\
|
||||
v(t) - au'(t) &= v(t+\epsilon) - bu'(t+\epsilon).
|
||||
v(t) + au'(t) &= v(t+\epsilon) + bu'(t+\epsilon).
|
||||
\end{align*}
|
||||
|
||||
|
||||
@ -1829,10 +1829,10 @@ We computed the above illustration using $3$ dimensions (hence the use of `[1:2]
|
||||
|
||||
|
||||
\begin{align*}
|
||||
\vec{\beta}' &= \frac{d(\vec\gamma + (1/k) \hat{N})}{dt}\\
|
||||
&= \hat{T} + (-\frac{k'}{k^2}\hat{N} + \frac{1}{k} \hat{N}')\\
|
||||
&= \hat{T} - \frac{k'}{k^2}\hat{N} + \frac{1}{k} (-\kappa \hat{T})\\
|
||||
&= - \frac{k'}{k^2}\hat{N}.
|
||||
\vec{\beta}' &= \frac{d(\vec\gamma + (1/ \kappa) \hat{N})}{ds}\\
|
||||
&= \hat{T} + (-\frac{\kappa '}{\kappa ^2}\hat{N} + \frac{1}{\kappa} \hat{N}')\\
|
||||
&= \hat{T} - \frac{\kappa '}{\kappa ^2}\hat{N} + \frac{1}{\kappa} (-\kappa \hat{T})\\
|
||||
&= - \frac{\kappa '}{\kappa ^2}\hat{N}.
|
||||
\end{align*}
|
||||
|
||||
|
||||
@ -2014,7 +2014,7 @@ An old problem of calculus is called the [goat problem](https://en.wikipedia.org
|
||||
|
||||
|
||||
|
||||
Let $r$ be the radius of a circle and for concreteness we position it at $(-r, 0)$. Let $R$ be the length of a rope, and suppose $R \ge \pi r$. (It is equal in the problem). Then the question can be rephrased as what is *twice* the area suggested by this graphic which is drawn in pieces:
|
||||
Let $r$ be the radius of a circle and for concreteness we position it at $(-r, 0)$. Let $R$ be the length of a rope, and suppose $R \ge 2\pi r$. (It is equal in the problem). Then the question can be rephrased as what is *twice* the area suggested by this graphic which is drawn in pieces:
|
||||
|
||||
|
||||
* Between angles $0$ and $\pi/2$ the horse has unconstrained access, so they can graze a wedge of radius $R$.
|
||||
@ -2240,7 +2240,7 @@ val, _ = quadgk(t -> f(x(t), y(t)) * sqrt(D(x)(t)^2 + D(y)(t)^2), a, b)
|
||||
numericq(val)
|
||||
```
|
||||
|
||||
##### Question
|
||||
###### Question
|
||||
|
||||
|
||||
Let $\vec{r}(t) = \langle t, t^2 \rangle$ describe a parabola. What is the arc length between $0 \leq t \leq 1$? First, what is a formula for the speed ($\| \vec{r}'(t)\|$)?
|
||||
@ -2269,7 +2269,7 @@ val,err = quadgk(t -> (1 + 4t^2)^(1/2), 0, 1)
|
||||
numericq(val)
|
||||
```
|
||||
|
||||
##### Question
|
||||
###### Question
|
||||
|
||||
|
||||
Let $\vec{r}(t) = \langle t, t^2 \rangle$ describe a parabola. What is the curvature of $\vec{r}(t)$ at $t=0$?
|
||||
@ -2429,7 +2429,7 @@ What is the $x$ coordinate of point $A$? (Also the $x$ coordinate of $P$.)
|
||||
#| hold: true
|
||||
#| echo: false
|
||||
choices = [
|
||||
" ``2̧\\cot(\\theta)``",
|
||||
" ``2\\cot(\\theta)``",
|
||||
" ``\\cot(\\theta)``",
|
||||
" ``2\\tan(\\theta)``",
|
||||
" ``\\tan(\\theta)``"
|
||||
@ -2457,7 +2457,7 @@ radioq(choices, answ)
|
||||
###### Question
|
||||
|
||||
|
||||
Let $n > 0$, $\vec{r}(t) = \langle t^(n+1),t^n\rangle$. Find the speed, $\|\vec{r}'(t)\|$.
|
||||
Let $n > 0$, $\vec{r}(t) = \langle t^{(n+1)},t^n\rangle$. Find the speed, $\|\vec{r}'(t)\|$.
|
||||
|
||||
|
||||
```{julia}
|
||||
@ -2600,7 +2600,7 @@ $$
|
||||
\frac{d\hat{T}}{ds} \frac{ds}{dt} \frac{ds}{dt} + \hat{T} \frac{d^2s}{dt^2} = \frac{d^2s}{dt^2}\hat{T} + \kappa (\frac{ds}{dt})^2 \hat{N},
|
||||
$$
|
||||
|
||||
Using $d\hat{T}{ds} = \kappa\hat{N}$ when parameterized by arc length.
|
||||
Using $d\hat{T}/{ds} = \kappa\hat{N}$ when parameterized by arc length.
|
||||
|
||||
|
||||
This expresses the acceleration in terms of the tangential part and the normal part. [Strang](https://ocw.mit.edu/resources/res-18-001-calculus-online-textbook-spring-2005/textbook/MITRES_18_001_strang_12.pdf) views this in terms of driving where the car motion is determined by the gas pedal and the brake pedal only giving acceleration in the $\hat{T}$ direction) and the steering wheel (giving acceleration in the $\hat{N}$ direction).
|
||||
@ -2660,7 +2660,7 @@ The evolute comes from the formula $\vec\gamma(T) - (1/\kappa(t)) \hat{N}(t)$. F
|
||||
r(t) &= x'(t)^2 + y'(t)^2\\
|
||||
k(t) &= x'(t)y''(t) - x''(t) y'(t)\\
|
||||
X(t) &= x(t) - y'(t) r(t)/k(t)\\
|
||||
Y(t) &= x(t) + x'(t) r(t)/k(t)
|
||||
Y(t) &= y(t) + x'(t) r(t)/k(t)
|
||||
\end{align*}
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ The square bracket constructor has some subtleties:
|
||||
|
||||
|
||||
* `[x,y,z]` calls `vect` and creates a 1-dimensional array
|
||||
* `[x; y; z]` calls `vcat` to **v**ertically con**cat**enate values together. With simple (scalar) values `[x,y,z]` and `[x; y; z]` are identical, but not in other cases. (For example, is `A` is a matrix then `[A, A]` is a vector of matrices, `[A; A]` is a matrix combined from the two pieces.
|
||||
* `[x; y; z]` calls `vcat` to **v**ertically con**cat**enate values together. With simple (scalar) values `[x,y,z]` and `[x; y; z]` are identical, but not in other cases. (For example, if `A` is a matrix then `[A, A]` is a vector of matrices, `[A; A]` is a matrix combined from the two pieces.
|
||||
* `[x y z]` calls `hcat` to **h**orizontally con**cat**enate values together. If `x`, `y` are numbers then `[x y]` is *not* a vector, but rather a $2$D array with a single row and two columns.
|
||||
* finally `[w x; y z]` calls `hvcat` to horizontally and vertically concatenate values together to create a container in two dimensions, like a matrix.
|
||||
|
||||
@ -106,7 +106,7 @@ quiver([0],[0], quiver=([1],[2]))
|
||||
The cumbersome syntax is typical here. We naturally describe vectors and points using `[a,b,c]` to combine them, but the plotting functions want to plot many such at a time and expect vectors containing just the `x` values, just the `y` values, etc. The above usage looks a bit odd, as these vectors of `x` and `y` values have only one entry. Converting from the one representation to the other requires reshaping the data. We will use the `unzip` function from `CalculusWithJulia` which in turn just uses the the `invert` function of the `SplitApplyCombine` package ("return a new nested container by reversing the order of the nested container") for the bulk of its work.
|
||||
|
||||
|
||||
This function takes a vector of vectors, and returns a vector containing the `x` values, the `y` values, etc. So if `u=[1,2,3]` and `v=[4,5,6]`, then `unzip([u,v])` becomes `[[1,4],[2,5],[3,6]]`, etc. (The `zip` function in base does essentially the reverse operation, hence the name.) Notationally, `A = [u,v]` can have the third element of the first vector (`u`) accessed by `A[1][3]`, where as `unzip(A)[3][1]` will do the same. We use `unzip([u])` in the following, which for this `u` returns `([1],[2],[3])`. (Note the `[u]` to make a vector of a vector.)
|
||||
This function takes a vector of vectors, and returns a tuple containing the `x` values, the `y` values, etc. So if `u=[1,2,3]` and `v=[4,5,6]`, then `unzip([u,v])` becomes `([1,4],[2,5],[3,6])`, etc. (The `zip` function in base does essentially the reverse operation, hence the name.) Notationally, `A = [u,v]` can have the third element of the first vector (`u`) accessed by `A[1][3]`, where as `unzip(A)[3][1]` will do the same. We use `unzip([u])` in the following, which for this `u` returns `([1],[2],[3])`. (Note the `[u]` to make a vector of a vector.)
|
||||
|
||||
|
||||
With `unzip` defined, we can plot a $2$-dimensional vector `v` anchored at point `p` through `quiver(unzip([p])..., quiver=unzip([v]))`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user