I want to solve a function using NLsolve, which has parameters. I do not want to pass them using global variables.
using NLsolve function f!(F, x) global a, b F = a * sin(x) + b end a = 1.0 b = 0.5 nlsolve(f!, [ 0.])
How can I solve this problem without using global variables?