You simply need two constraints, area_surf < 10 and area_surf > 5.
function [c, ceq]= contraints(x)
c(2) = area_surf(x) - 10;
c(1) = 5 - area_surf(x);
ceq = [];
end
Alan Weiss
MATLAB mathematical toolbox documentation
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!