Does "fsolve" still avaliable for sloving the nonlinear equation?

I would like to slove the nonlinear equation above and I use matlab to code below but the command window showed: Undefined function 'fsolve' for input arguments of type 'function_handle'.
How should I use the fsolve function or is there any other way to solve these nonlinear equation?
Thank you very much!
clc; clear;
f=@(x) [2.*x(1)-x(2)-exp(-x(1));-x(1)+2.*x(2)-exp(-x(2))];
fsolve(f,[-5,-5])

 採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 5 月 25 日

2 投票

Hi,
In order to employ fsolve() function, you should have optimization toolbox installed in your computer.
fsolve is part of optimization toolbox and thus, you have gotten such an error message.

2 件のコメント

Mark
Mark 2021 年 5 月 25 日
After I install the optimization toolbox, it works! Thanks a lot!!
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 5 月 26 日
Most welcome! It is a pleasure to help.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Mathematics についてさらに検索

製品

リリース

R2020a

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by