Hi. I’m interested in ‘nlsolve’ function for solving system of equations.
Let us consider simple example:
where a is a vector that it can take values 3 and 5.
I want to solve system of equations for each value of a.
For a=3, (x,y)=(4,7), and for a=5, (x,y)=(6,11).
I solve it in a loop:
function f!(F, x, a)
initial_x=[ 0.1; 0.2]
res=nlsolve((F,x) -> f!(F, x, a[i]), initial_x)
Is there any smart way to avoid looping?
Also, I would appreciate if you can explain the helper function