关于MATLAB中fmicon函数的求解.
关于MATLAB中fmicon函数的求解.
z=@(x)(2*sin(x(1) + 7/20)*((900*cos(9/100)*cos(x(1)))/sin(x(1) - 9/100) + (421875*cos(9/100)*cos(x(1))*((125*sin((157*x(2))/25))/2 - (314*cos(628/625 - (157*x(2))/25))/5 + (125*sin(628/625 - (157*x(2))/25))/2))/(98596*sin(x(1) - 9/100))) + (224775*cos(x(1) + 7/20)*cos(9/100)*cos(x(1))*((333*sin((157*x(2))/25))/10 - (314*cos(471/250 - (157*x(2))/25))/5 + (333*sin(471/250 - (157*x(2))/25))/10))/(24649*sin(x(1) - 9/100)))/(1800*cos(x(1) + 131/250));
>> A=[1,0;0,1];
>> b=[1.75;1];
>> x0=[0,0];
>> [x,feval]=fmincon(z,x0,A,b);
楼主得出结果;
x =
0.0900 -0.4486
feval =
-2.0536e+006
X1(0,1.75);X2(0,1);我好像只加了X1,X2的上限,要怎么加呢,急.加了下限是不是结果就不是关于e的值了.
z=@(x)(2*sin(x(1) + 7/20)*((900*cos(9/100)*cos(x(1)))/sin(x(1) - 9/100) + (421875*cos(9/100)*cos(x(1))*((125*sin((157*x(2))/25))/2 - (314*cos(628/625 - (157*x(2))/25))/5 + (125*sin(628/625 - (157*x(2)...