You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, does NLsolve not support non-square problems? I ran into an error when trying to solve a problem with more equations than than unknown variables which I replicated on a small testing script.
using NLsolve
using Rotations
j = [0,1,0]
function f(ϕ,u)
RotX(ϕ[1])*RotY(ϕ[2])*RotY(ϕ[3])*j - u
end
function g(ϕ,u)
RotX(ϕ[1])*RotY(ϕ[2])*j - u
end
v = [0,cos(pi/3),sin(pi/3)]
f([pi/3;0;0],v)
nlsolve((x)->f(x,v),[pi/4;0;0])
g([pi/3;0],v)
nlsolve((x)->g(x,v),[pi/4;0])
with console output
julia> nlsolve((x)->g(x,v),[pi/4;0])
ERROR: BoundsError: attempt to access 2-element Array{Float64,1} at index [1, 2, 3]
I am sure that the newton method is applicable to such problems so I do not see a reason why NLsolve would not handle it.
The text was updated successfully, but these errors were encountered:
JurajLieskovsky
changed the title
No support for non-square problem?
No support for non-square problems?
Mar 14, 2021
Hi, does NLsolve not support non-square problems? I ran into an error when trying to solve a problem with more equations than than unknown variables which I replicated on a small testing script.
with console output
I am sure that the newton method is applicable to such problems so I do not see a reason why NLsolve would not handle it.
The text was updated successfully, but these errors were encountered: