We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I just copy-pasted the code in Julia 1.5.3.
using NLsolve function f!(F, x) F[1] = (x[1]+3)*(x[2]^3-7)+18 F[2] = sin(x[2]*exp(x[1])-1) end function j!(J, x) J[1, 1] = x[2]^3-7 J[1, 2] = 3*x[2]^2*(x[1]+3) u = exp(x[1])*cos(x[2]*exp(x[1])-1) J[2, 1] = x[2]*u J[2, 2] = u end nlsolve(f!, j!, [ 0.1; 1.2])
Which returns
MethodError: no method matching j!(::Array{Float64,1}) Closest candidates are: j!(::Any, !Matched::Any) at In[21]:8
The text was updated successfully, but these errors were encountered:
It works fine on my end
julia> using NLsolve julia> function f!(F, x) F[1] = (x[1]+3)*(x[2]^3-7)+18 F[2] = sin(x[2]*exp(x[1])-1) end f! (generic function with 1 method) julia> function j!(J, x) J[1, 1] = x[2]^3-7 J[1, 2] = 3*x[2]^2*(x[1]+3) u = exp(x[1])*cos(x[2]*exp(x[1])-1) J[2, 1] = x[2]*u J[2, 2] = u end j! (generic function with 1 method) julia> nlsolve(f!, j!, [ 0.1; 1.2]) Results of Nonlinear Solver Algorithm * Algorithm: Trust-region with dogleg and autoscaling * Starting Point: [0.1, 1.2] * Zero: [-3.7818049096324184e-16, 1.0000000000000002] * Inf-norm of residuals: 0.000000 * Iterations: 4 * Convergence: true * |x - x'| < 0.0e+00: false * |f(x)| < 1.0e-08: true * Function Calls (f): 5 * Jacobian Calls (df/dx): 5
Sorry, something went wrong.
No branches or pull requests
I just copy-pasted the code in Julia 1.5.3.
Which returns
The text was updated successfully, but these errors were encountered: