Skip to content

Commit c4920b7

Browse files
committed
Patch Watson Function
1 parent 1e8c196 commit c4920b7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/NonlinearProblemLibrary/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "NonlinearProblemLibrary"
22
uuid = "b7050fa9-e91f-4b37-bcee-a89a063da141"
3-
version = "0.1.1"
3+
version = "0.1.2"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ p5_dict = Dict("n" => n, "start" => x_start, "sol" => x_sol,
9090
# ------------------------------------- Problem 6 ------------------------------------------
9191
function p6_f!(out, x, p = nothing)
9292
n = length(x)
93+
out .= 0
9394
for i in 1:29
9495
ti = i / 29.0
9596
sum1 = 0.0
@@ -113,7 +114,7 @@ function p6_f!(out, x, p = nothing)
113114
end
114115
end
115116

116-
out[1] = out[1] + 3.0 * x[1] - 2.0 * x[1] * x[1] + 2.0 * x[1]^3
117+
out[1] = out[1] + 3.0 * x[1] - 2.0 * x[1] * x[2] + 2.0 * x[1]^3
117118
out[2] = out[2] + x[2] - x[2]^2 - 1.0
118119
nothing
119120
end

0 commit comments

Comments
 (0)