# NLSolve vs fsolve (matlab): What am I doing wrong?

**URL:** <https://discourse.julialang.org/t/nlsolve-vs-fsolve-matlab-what-am-i-doing-wrong/88095>\
**Category:** Optimization (Mathematical)\
**Created:** [October 1, 2022, 8:57pm UTC](https://discourse.julialang.org/t/nlsolve-vs-fsolve-matlab-what-am-i-doing-wrong/88095 "2022-10-01T20:57:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Post date:** [October 1, 2022, 9:05pm UTC](https://discourse.julialang.org/t/nlsolve-vs-fsolve-matlab-what-am-i-doing-wrong/88095/2 "2022-10-01T21:05:34Z")

</div>

hi!, can you provide your `kappa`, `zeta`, `eta`, `beta` parameters? i can’t reproduce your code without those. meanwhile, can you try using `x0 = [10.0]` instead?  
Also, i recommend you to paste your code in triple backticks to make debbuging easier:

````julia
```julia
function f(x, y)
    x + y
end```

````

[Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)

---

_[View the full topic](https://discourse.julialang.org/t/nlsolve-vs-fsolve-matlab-what-am-i-doing-wrong/88095)._
