It’s pretty hard to guess what you did when you say “I used your example.” Did you try to run the code I provided by cutting and pasting it exactly as is? Did you try to run nlsolve
using my f!
and your f
? Or something else? We need a complete minimum working example and explicit error messages to be able to help.
Please do read Please read: make it easier to help you and follow its recommendations.