Chapter 3 Graphical Solution Method and Basic Optimization Concepts
MATLAB Code
[Ro,Ri]=meshgrid(20:1:60, 20:1:56);
%Enter functions for the minimization problem
f=0.1233*(Ro.^2-Ri.^2);
g1=15915.5-250*(Ro.^2-Ri.^2);
g2=5*10^4-0.06511*(Ro.^4-Ri.^4);
g3=(Ro+Ri)-100*(Ro-Ri);
g4=5–Ro+Ri;
cv11=[0.01:0.01:0.2];
const1=contour(Ro,Ri,g1,cv11,’c’);
const2=contour(Ro,Ri,g2,cv1,’k’,’Linewidth’,3);
const2=contour(Ro,Ri,g2,cv11,’c’);
text(34,24,’g2′)
const6=contour(Ro,Ri,g6,cv11,’c’);
text(0,7,’g6′)
const7=contour(Ro,Ri,g7,cv1,’k’,’Linewidth’,3);
const7=contour(Ro,Ri,g7,cv11,’c’);
text(6,200,’g7′)