Minimization of a function with two variables

Hello, i should minimize a function with two variables, and then i should know the value of that two variables which give the minimum value of the function. I can't know from that value that two variables start. There is a function that can help me? thanks

 Accepted Answer

John D'Errico
John D'Errico on 1 Jun 2016
Edited: John D'Errico on 1 Jun 2016
Use fminsearch or fminunc
More, depending on the specifics of your problem.

2 Comments

The problem is that fminsearch works with initial conditions and fminunc with boundary conditions and i don't know nothing. My problem is the assesment of fatigue parameters and i have to do it by minimizing the actual life and the numerical life. The numerical life is a function of two variables, exactly the fatigue parameters.
Sorry. You are wrong there. BOTH fminsearch and fminunc need initial estimates of the variables. They have nothing to do with boundary conditions. If you don't understand optimization then you need to spend some time reading the tutorials. Read the help. Try the examples. There is lots of stuff already provided there.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!