Minimize function with respect to multiple variables, with constraints

4 views (last 30 days)
Hi,
I have a function f(p, T) that needs to be minimized. How can I find the minimum value with 55 < p < 170, and 380 < T < 583?
Thanks for the help.

Answers (1)

Walter Roberson
Walter Roberson on 3 Jun 2015
Provided that the function has a scalar output, then
lb = [55; 380];
ub = [170; 583];
x0 = (lb+ub)./2; %somewhere in the range
fmincon(@(pT) f(pT(1), pT(2)), x0, [], [], [], [], lb, ub)

Categories

Find more on Contour Plots 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!