|
是的,不满足这个条件,所以没有运行。下面这个代码,可以把所有情况都运行到
for B=0:0.5:20
for alp=1:0.1:6
f=@(theta)(B*(12-12*theta)*((4*alp-1)^2)-theta*(24*alp*(1-theta)+25*alp)*(12*(4*alp-1)-(2*alp-1)*(24-12*theta)+alp));
m1=fzero(f,[0 1]);%(DU)
g=@(theta)(B*12*(1-theta)*((4*alp-1)^2)-theta*(24+2*alp*(1-theta))*(24*alp-alp*(2*alp-1)*(1-theta)));
m2=fzero(g,[0,1]);%(UD)
h=@(theta)(B*12*(1-theta)*((4*alp-1)^2)-theta*(24*alp+25*alp*(1-theta))*(12*(4*alp-1)-(2*alp-1)*(24-12*theta)+alp*(1-theta))-...
theta*(12+12*(1-theta)+2*alp*(1-theta))*(12*alp*(1-theta)-alp*(2*alp-1)*(1-theta)+12*alp));
m3=fzero(h,[0 1]);%(DD)
Y=max(12/(2*alp+12)*m1,m3);
Z=max(2*alp/(2*alp+12)*m2,Y);
if Z==12/(2*alp+12)*m1 && Z==2*alp/(2*alp+12)*m2
plot(alp,B,'ko')%(UU)
hold on
else if Z==12/(2*alp+12)*m1 %(DU)
plot(alp,B,'rp')
hold on
else if Z==2*alp/(2*alp+12)*m2 % (UD)
plot(alp,B,'g^')
hold on
else plot(alp,B,'*') % (DD)
hold on
end
end
end
end
end
xlabel('\alpha')
ylabel('B')
|