How can I install Optimization toolbox?

function F =fun(x)
F(1) = exp(-exp(-(x(1)+x(2)))) - x(2)*(1+x(1)^2);
F(2) = x(1)*cos(x(2)) + x(2)*sin(x(1)) - 0.5;
end
command box
>> x0=[0;0];
>> fsolve(@(x) fun(x),x0)
'fsolve' requires Optimization Toolbox.
Why this is happening?

Answers (3)

How can I install fsolve?

1 Comment

The fsolve function is part of Optimization Toolbox. You can check if you have this toolbox installed by running the ver command and looking for a line starting with "Optimization Toolbox" in the displayed output.

Sign in to comment.

Categories

Products

Release

R2019b

Asked:

on 31 Mar 2020

Commented:

on 27 Mar 2024

Community Treasure Hunt

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

Start Hunting!