Hi, I wrote a very simple problem to test out NLsolve for systems of goniometric equations:
using NLsolve
using Rotations
using StaticArrays
j = @SVector [0,1,0]
v = @SVector [0,cos(pi/3),sin(pi/3)]
function g!(G,ϕϕ)
G = RotX(ϕϕ[1])*RotY(ϕϕ[2])*j - v
end
nlsolve(g!,[pi/4;0])
My guess would be that there is no appropriate algorithm for solving the problem implemented in NLsolve as when solving the problem with matlab's fsolve() it switches from "Trust-region-dogleg" to "Levenberg-Marquardt" because the problem is non-square and the "Newton method" in NLsolve can't be used either as it results in
ERROR: DomainError with -Inf:
sincos(x) is only defined for finite x.
Am I correct or did I miss something very basic? (I am very new to NLsolve and Julia in general)
Hi, I wrote a very simple problem to test out NLsolve for systems of goniometric equations:
(RotX and RotY follow the convention as in https://en.wikipedia.org/wiki/Rotation_matrix#In_three_dimensions) which for some reason does not converge
My guess would be that there is no appropriate algorithm for solving the problem implemented in NLsolve as when solving the problem with matlab's
fsolve()
it switches from "Trust-region-dogleg" to "Levenberg-Marquardt" because the problem is non-square and the "Newton method" in NLsolve can't be used either as it results inAm I correct or did I miss something very basic? (I am very new to NLsolve and Julia in general)