早教吧作业答案频道 -->数学-->
functionf=myfun(X)f=0.34*X(1)+0.004*X(2)+0.14*X(3)+0.24*X(4)+0.08*X(5)+0.03*X(6)+6.05*X(7);goal=functionf=myfun(X)f=0.34*X(1)+0.004*X(2)+0.14*X(3)+0.24*X(4)+0.08*X(5)+0.03*X(6)+6.05*X(7);goal=[1,1,1];weight=[1,1,1];X0=[190;150;120;60;800;1100;4];
题目详情
function f=myfun(X) f=0.34*X(1)+0.004*X(2)+0.14*X(3)+0.24*X(4)+0.08*X(5)+0.03*X(6)+6.05*X(7); goal=
function f=myfun(X)
f=0.34*X(1)+0.004*X(2)+0.14*X(3)+0.24*X(4)+0.08*X(5)+0.03*X(6)+6.05*X(7);
goal=[1,1,1];
weight=[1,1,1];
X0=[190;150;120;60;800;1100;4];
b=[0;0;0;0;0;0;0;400;-340];
Aeq=[0.3175;1;0.4762;0.3448;0.3816;0.3704;0];
beq=[990];
lb=[170;135;60;0;700;1000;2];
ub=[250;190;160;60;1000;1300;12];
A=[0.3 -1 0.3 0.3 0 0 0
-0.45 1 -0.45 -0.45 0 0 0
0 0 0 0 -0.65 0.35 0
0 0 0 0 0.58 -0.42 0
-14.6 29.77 -14.6 -14.6 0 0 0
0.01 0 0 0 0 0 -1
-0.02 0 0 0 0 0 1
1 0 1 1 0 0 0
-1 0 -1 -1 0 0 0];
[X,fval,attainfactor,exitflag]=fgoalattain(@myfun,X0,goal,weight,A,b,Aeq,beq,lb,ub)
运行时出现Maximum recursion limit of 500 reached.Use set(0,'RecursionLimit',N)
to change the limit.Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.
Error in ==> optimget at 166
set(0,'RecursionLimit',N)将500 递归限制改大后无法运行
function f=myfun(X)
f=0.34*X(1)+0.004*X(2)+0.14*X(3)+0.24*X(4)+0.08*X(5)+0.03*X(6)+6.05*X(7);
goal=[1,1,1];
weight=[1,1,1];
X0=[190;150;120;60;800;1100;4];
b=[0;0;0;0;0;0;0;400;-340];
Aeq=[0.3175;1;0.4762;0.3448;0.3816;0.3704;0];
beq=[990];
lb=[170;135;60;0;700;1000;2];
ub=[250;190;160;60;1000;1300;12];
A=[0.3 -1 0.3 0.3 0 0 0
-0.45 1 -0.45 -0.45 0 0 0
0 0 0 0 -0.65 0.35 0
0 0 0 0 0.58 -0.42 0
-14.6 29.77 -14.6 -14.6 0 0 0
0.01 0 0 0 0 0 -1
-0.02 0 0 0 0 0 1
1 0 1 1 0 0 0
-1 0 -1 -1 0 0 0];
[X,fval,attainfactor,exitflag]=fgoalattain(@myfun,X0,goal,weight,A,b,Aeq,beq,lb,ub)
运行时出现Maximum recursion limit of 500 reached.Use set(0,'RecursionLimit',N)
to change the limit.Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.
Error in ==> optimget at 166
set(0,'RecursionLimit',N)将500 递归限制改大后无法运行
▼优质解答
答案和解析
f(1)=-p*x(1)-0.3*x(2)-0.3*x(3); f(2)=-0.34*x(4)-0.34*x(5)-0.34*x(6); f(3)=0.5*f(1)
看了 functionf=myfu...的网友还看了以下:
解方程 1/6{1/4[1/3(1/2x-1)+5}=1解方程1/6{1/4[1/3(1/2x-1 2020-05-16 …
四年级寒假学与练第30页数学题,怎么解答? □□□ X □□ -------- 5 □□ □□4 2020-05-16 …
functionf=myfun(X)f=0.34*X(1)+0.004*X(2)+0.14*X(3 2020-05-21 …
(0.3+0.4+0.5+0.6+1)x(0.3+0.4+0.5+0.6+0.999)-(0.3+ 2020-06-14 …
1)3*1.8-0.6x=5.12)7.7-2x+9.9=03)x/12-6=5.54)2.5/5 2020-07-18 …
解方程:5×3-x÷2=80.273÷x=0.351.8x=0.972x÷0.756=909x-4 2020-07-19 …
小学6年级数学问题解方程X-4×3/2=3/2X1/8(X+0.5)=75%3又5/4X+1.2X 2020-07-19 …
解方程跪求急要过程12x=300-4x7x+5.3=7.43x÷5=4.830÷x+25=851.4 2020-10-31 …
解方程(前两题写出检验过程):(1)0.8x-0.5x=1.2(2)3×1.5+4x=14.5(3) 2020-12-13 …
分数方程怎么算?(1)0.7x-3=0.3x+2(2)八分之一乘(x+0.5)=四分之三(3)3乘( 2020-12-17 …