Skip to content

Commit 455e6a6

Browse files
Update Inverse eigenvalue problem.jl
1 parent 26fac4b commit 455e6a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Extras/Inverse eigenvalue problem.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ import ApproxFun: bandwidth
1212
# To answer this question, we use a dual number to observe the sensitivity in λ₀
1313
# with respect to perturbations in b. The `realpart` of the objective function
1414
#
15-
# f(λ) = λ - 1,
15+
# f(λ(b)) = λ(b) - 1,
1616
#
17-
# extracts the difference, whereas the `dualpart` evaluates to f'(λ).
17+
# extracts the difference, whereas the `dualpart` evaluates to ∂f/∂b (λ(b)).
1818
#
1919

2020
n = 100
21-
λ = dual(0.0,0.0)
22-
b = dual(eps(), 1.0)
21+
λ = dual(0.0, 0.0)
22+
b = dual(0.0, 1.0)
2323
v = zeros(Dual{Float64}, n)
2424
v[1] = 1
2525
v .+= 0.003.*randn(Float64, n)

0 commit comments

Comments
 (0)