Merge branch 'main' into v0.5

This commit is contained in:
jverzani 2022-08-25 16:19:25 -04:00
commit 82888dd725
2 changed files with 5 additions and 5 deletions

View File

@ -320,7 +320,7 @@ In this example, we use the fact that `rem(k, 7)` returns the remainder found fr
sum(k for k in 1:100 if rem(k,7) == 0) ## add multiples of 7
```
The same `if` can be used in a comprehension. For example, this is an alternative to `filter` for identifying the numbers divisble by `7` in a range of numbers:
The same `if` can be used in a comprehension. For example, this is an alternative to `filter` for identifying the numbers divisible by `7` in a range of numbers:
```{julia}
@ -330,7 +330,7 @@ The same `if` can be used in a comprehension. For example, this is an alternativ
#### Example: Making change
This example of Stefan Karpinski comes from a [blog](http://julialang.org/blog/2016/10/julia-0.5-highlights) post highlighting changes to the `Julia` language with version `v"0.5.0"`, which added features to comprehensions that made this example possible.
This example of Stefan Karpinski's comes from a [blog](http://julialang.org/blog/2016/10/julia-0.5-highlights) post highlighting changes to the `Julia` language with version `v"0.5.0"`, which added features to comprehensions that made this example possible.
First, a simple question: using pennies, nickels, dimes, and quarters how many different ways can we generate one dollar? Clearly $100$ pennies, or $20$ nickels, or $10$ dimes, or $4$ quarters will do this, so the answer is at least four, but how much more than four?
@ -506,7 +506,7 @@ Does vector addition work? as expected? In particular, is the result of `(1:4) +
yesnoq(true)
```
What if parenthese are left off? Explain the output of `1:4 + 2:5`?
What if parentheses are left off? Explain the output of `1:4 + 2:5`?
```{julia}

View File

@ -219,7 +219,7 @@ plot(𝒇, -2, 2, label="f")
plot!(scale(𝒇, 2), label="scale")
```
Scaling by $2$ shrinks the non-zero domain, scaling by $1/2$ would stretch it. If this is not intuitive, the defintion `x-> f(x/c)` could have been used, which would have opposite behaviour for scaling.
Scaling by $2$ shrinks the non-zero domain, scaling by $1/2$ would stretch it. If this is not intuitive, the definition `x-> f(x/c)` could have been used, which would have opposite behaviour for scaling.
---
@ -333,7 +333,7 @@ This is off by a fair amount - almost $12$ minutes. Clearly a trigonometric mode
##### Example: a growth model in fisheries
The von Bertanlaffy growth [equation](http://www.fao.org/docrep/W5449e/w5449e05.htm) is $L(t) =L_\infty \cdot (1 - e^{k\cdot(t-t_0)})$. This family of functions can be viewed as a transformation of the exponential function $f(t)=e^t$. Part is a scaling and shifting (the $e^{k \cdot (t - t_0)}$) along with some shifting and stretching. The various parameters have physical importance which can be measured: $L_\infty$ is a carrying capacity for the species or organism, and $k$ is a rate of growth. These parameters may be estimated from data by finding the "closest" curve to a given data set.
The von Bertalanffy growth [equation](http://www.fao.org/docrep/W5449e/w5449e05.htm) is $L(t) =L_\infty \cdot (1 - e^{k\cdot(t-t_0)})$. This family of functions can be viewed as a transformation of the exponential function $f(t)=e^t$. Part is a scaling and shifting (the $e^{k \cdot (t - t_0)}$) along with some shifting and stretching. The various parameters have physical importance which can be measured: $L_\infty$ is a carrying capacity for the species or organism, and $k$ is a rate of growth. These parameters may be estimated from data by finding the "closest" curve to a given data set.
##### Example: the pipeline operator