How to use fsolve
Info
This question is closed. Reopen it to edit or answer.
Show older comments
After that I get my target equation which has only 1 Unknown. So something like:
eqn=[x^2];
solution=fsolve(@(x) eqn, startx);
Unfortunatlly that does not work. Thank You very much!
1 Comment
The fsolve help states that the first input must be "specified as a function handle or function name", and all of the examples show fsolve being used with function handles. You should learn about function handles:
Also note that the square brackets are totally superfluous:
Answers (1)
Torsten
on 12 Apr 2018
eqn5 = @(x)x^2+1;
solution = fsolve(eqn5, startx);
Best wishes
Torsten.
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!