Appendix A. MATLAB Scripts

Script 1: graphing functions u1 and u2 in design space in Example 2.9.
clear all;[q1,q2] = meshgrid(0:1:100,0:1:100);u1 = -q1.ˆ 2+(198-q2).∗q1;[C,h] = contour(q1,q2,u1,3);
set(h,'ShowText','on','TextStep',get(h,'LevelStep')∗2)colormap coolhold on;u2 = -q2.ˆ 12+(198-q1).∗q2;[C,h] = contour(q1,q2,u2,3);set(h,'ShowText','on','TextStep',get(h,'LevelStep')∗2)
colormap cool.
hold off;
Script 2: graphing functions u1 and u2 in criterion space in Example 2.9
%Cournot example; plot objective domainclear all; format longNN = 10,000;  %No. of random points for plotting%----------------------------------------------A = 1; %counting feasible pointsB = 1; %counting infeasible pointsSmax = 0;q1o = 0;q2o = 0;for ii = 1:NN    q1 = rand∗100; ...

Get Design Theory and Methods using CAD/CAE now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.