How can I find maximum of a function in MATLAB?

9 views (last 30 days)
How can I find the maximum value of a function in MATLAB? And that function has some subject to constrain criteria also.

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 5 May 2015
Hi Gollapinni,
usually by finding the minimum of "-f". How to do this depends on your function. Good starting point is fminsearch, or, if you have constraints, fmincon from Optimization Toolbox.
Titus
  4 Comments
Gollapinni Karthik
Gollapinni Karthik on 7 May 2015
How do I set these kinds of Subject to k, m ϵ N s ϵ [0, 1] my maximum function? How to model it belong to Natural number in Matlab and belongs to only 0 and 1 in Matlab?

Sign in to comment.

More Answers (0)

Categories

Find more on Problem-Based Optimization Setup in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!