Minimize function with respect to multiple variables, with constraints
4 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
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)
0 Comments
See Also
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!