Skip to content

i have tried to solve this in jullia 1.4.2, but got error #251

Closed
@qorimaputri

Description

@qorimaputri

image

**f! = function (x,dx)
dx[1] = x[1] + x[2](x[2](5-x[2])-2)-13
dx[2] = x[1] + x[2](x[2](1+x[2])-14)-29
end

solve = nlsolve(f!,[15;-2])
**
InexactError: Int64(NaN)

Stacktrace:
[1] Int64(::Float64) at .\float.jl:710
[2] alloc_DF(::Array{Int64,1}, ::Array{Int64,1}) at C:\Users\WIN10.julia\packages\NLSolversBase\QPnui\src\objective_types\abstract.jl:19
[3] nlsolve(::Function, ::Array{Int64,1}; method::Symbol, autodiff::Symbol, inplace::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\WIN10.julia\packages\NLsolve\04rfI\src\nlsolve\nlsolve.jl:49
[4] nlsolve(::Function, ::Array{Int64,1}) at C:\Users\WIN10.julia\packages\NLsolve\04rfI\src\nlsolve\nlsolve.jl:46
[5] top-level scope at In[16]:5

how can solve these??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions