a = 0.2;
b = 0.5;
c = 1.5;
d = 0.5;
gpvar wa wb wc wd ha hb hc hd
obj = max(wa + wb, wc + wd)*(max(ha,hb) + max(hc,hd));
constr = [ ha*wa == a; hb*wb == b; hc*wc == c; hd*wd == d ];
global QUIET; QUIET = 1;
N = 20;
alpha = linspace(1.01,4,N);
min_area = []; status_history = {};
for n = 1:N
constr(5) = 1/alpha(n) <= ha/wa; constr(6) = ha/wa <= alpha(n);
constr(7) = 1/alpha(n) <= hb/wb; constr(8) = hb/wb <= alpha(n);
constr(9) = 1/alpha(n) <= hc/wc; constr(10) = hc/wc <= alpha(n);
constr(11) = 1/alpha(n) <= hd/wd; constr(12) = hd/wd <= alpha(n);
[obj_value, solution, status] = gpsolve(obj, constr);
min_area(n,1) = obj_value;
status_history{end+1} = status;
end
global QUIET; QUIET = 1;
plot(alpha,min_area);
xlabel('alpha'); ylabel('min area');
axis([1 4 2.5 4]);

Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.
Problem succesfully solved.