@@ -516,9 +516,9 @@ therefore damped oscillations')
516516therefore get smooth convergence to a steady state')
517517```
518518
519- ``` {code-cell} ipython3
520- ### Test the categorize_solution function
519+ To test the categorize_solution function,
521520
521+ ``` {code-cell} ipython3
522522categorize_solution(1.3, -.4)
523523```
524524
618618 pairs that would generate those roots
619619
620620``` {code-cell} ipython3
621- ### code to reverse-engineer a cycle
622- ### y_t = r^t (c_1 cos(ϕ t) + c2 sin(ϕ t))
623- ###
624-
625621def f(r, ϕ):
626622 """
627623 Takes modulus r and angle ϕ of complex number r exp(j ϕ)
@@ -638,16 +634,16 @@ def f(r, ϕ):
638634 b = -ρ2 # Reverse-engineer a and b that validate these
639635 a = ρ1 - b
640636 return ρ1, ρ2, a, b
637+ ```
641638
642- ## Now let's use the function in an example
643- ## Here are the example parameters
639+ Now let's use the function in an example. Here are the example parameters:
644640
641+ ``` {code-cell} ipython3
645642r = .95
646643period = 10 # Length of cycle in units of time
647644ϕ = 2 * math.pi/period
648645
649646## Apply the function
650-
651647ρ1, ρ2, a, b = f(r, ϕ)
652648
653649print(f"a, b = {a}, {b}")
@@ -743,8 +739,7 @@ r = 1 # Generates undamped, nonexplosive cycles
743739period = 10 # Length of cycle in units of time
744740ϕ = 2 * math.pi/period
745741
746- ## Apply the reverse-engineering function f
747-
742+ # Apply the reverse-engineering function f
748743ρ1, ρ2, a, b = f(r, ϕ)
749744
750745# Drop the imaginary part so that it is a valid input into y_nonstochastic
0 commit comments